Skip to content

Commit 1baba79

Browse files
Update sampleRate for macOS 15+
1 parent 7446acd commit 1baba79

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

Cookbook/Cookbook/CookbookApp.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,14 @@ struct CookbookApp: App {
1515
// Settings.sampleRate default is 44_100
1616
if #available(iOS 18.0, *) {
1717
if !ProcessInfo.processInfo.isMacCatalystApp && !ProcessInfo.processInfo.isiOSAppOnMac {
18-
// iOS 18 app (not on Mac)
18+
// Set samplerRate for iOS 18 and newer
1919
Settings.sampleRate = 48_000
2020
}
2121
}
22+
if #available(macOS 15.0, *) {
23+
// Set samplerRate for macOS 15 and newer
24+
Settings.sampleRate = 48_000
25+
}
2226

2327
try AVAudioSession.sharedInstance().setPreferredIOBufferDuration(Settings.bufferLength.duration)
2428
try AVAudioSession.sharedInstance().setCategory(.playAndRecord,

0 commit comments

Comments
 (0)