Post

Replies

Boosts

Views

Activity

Using .mixWithOthers or . duckOthers when setting category of AVAudioSession.sharedInstance gives error in WatchOS10
Hi, I have an audio playing Watch app that uses the shared AVAudioSession to play audio. Until WatchOS10 it was working fine, with the session configured as follows: try AVAudioSession.sharedInstance().setCategory(AVAudioSession.Category.playback, mode: .default, policy: .longFormAudio, options: [.mixWithOthers]) But in WatchOS10, the following error is thrown The operation couldn’t be completed. (OSStatus error -50.) Using a category of [.duckOthers] produces the same error. Setting the category options to [] does not throw the error, but now the audio is not mixed with other system audio. Anyone else having this problem, or have a solution? Thanks Rich
4
0
936
Sep ’23