Hello,
I have been working on an audio module that plays a specific sound at regular intervals -- similar to a workout timer that alerts the user to switching exercises every few minutes.
I'm configuring my audio session like this:
let session = AVAudioSession.sharedlnstance()
try session.setCategory(
.playback,
mode: default,
options: [.interruptSpokenAudioAndMixWithOthers, .duckOthers]
)
self.engine.attach(self.player)
self.engine.connect(self.player, to: self.engine.outputNode, format: self.audioFormat)
try session. setActive(true)
Topic:
Community
SubTopic:
Apple Developers