Skip to content

Commit

Permalink
Hounds
Browse files Browse the repository at this point in the history
  • Loading branch information
NickCulbertson committed Sep 6, 2024
1 parent 87109d4 commit fd5eacf
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions Cookbook/Cookbook/CookbookApp.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,13 @@ struct CookbookApp: App {
#if os(iOS)
do {
Settings.bufferLength = .short

let deviceSampleRate = AVAudioSession.sharedInstance().sampleRate
if deviceSampleRate > Settings.sampleRate {
// Update sampleRate to 48_000. Default is 44_100.
Settings.sampleRate = deviceSampleRate
}



try AVAudioSession.sharedInstance().setPreferredIOBufferDuration(Settings.bufferLength.duration)
try AVAudioSession.sharedInstance().setCategory(.playAndRecord,
options: [.defaultToSpeaker, .mixWithOthers, .allowBluetoothA2DP])
Expand Down

0 comments on commit fd5eacf

Please sign in to comment.