We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7a14910 + 2afe50c commit 6bff1a5Copy full SHA for 6bff1a5
Cookbook/Cookbook/CookbookApp.swift
@@ -12,10 +12,9 @@ struct CookbookApp: App {
12
do {
13
Settings.bufferLength = .short
14
15
- let deviceSampleRate = AVAudioSession.sharedInstance().sampleRate
16
- if deviceSampleRate > Settings.sampleRate {
17
- // Update sampleRate to 48_000. Default is 44_100.
18
- Settings.sampleRate = deviceSampleRate
+ // Settings.sampleRate default is 44_100
+ if #available(iOS 18.0, *) {
+ Settings.sampleRate = 48_000
19
}
20
21
try AVAudioSession.sharedInstance().setPreferredIOBufferDuration(Settings.bufferLength.duration)
0 commit comments