Skip to content

Commit 7446acd

Browse files
Remove sampleRate update for iOS running on Mac
1 parent 6bff1a5 commit 7446acd

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Cookbook/Cookbook/CookbookApp.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ struct CookbookApp: App {
1414

1515
// Settings.sampleRate default is 44_100
1616
if #available(iOS 18.0, *) {
17-
Settings.sampleRate = 48_000
17+
if !ProcessInfo.processInfo.isMacCatalystApp && !ProcessInfo.processInfo.isiOSAppOnMac {
18+
// iOS 18 app (not on Mac)
19+
Settings.sampleRate = 48_000
20+
}
1821
}
1922

2023
try AVAudioSession.sharedInstance().setPreferredIOBufferDuration(Settings.bufferLength.duration)

0 commit comments

Comments
 (0)