Hi Halle,
I’m getting feedback from my userbase that when they have the Music app playing and launch my app the music continues to play (good), however, when they background the app and bring it up again, the music stops playing (bad).
I dug into this and found the reason. In the OEContinuousAudioUnit.m file, on init, this registers to be notified on audio interruptions which is fine, however, in the processing of the interruption it’s assuming that the user is in a speech detection mode and automatically assigns the audioSession back to PlayAndRecord which kills the audio from the other app. I’ve verified my app does not set the audiosession again after startup.
In this test I don’t turn on speech processing. This is just the result of letting OE go through the init process when the app is initialized.
I’ve made a fix to OEContinuousAudioUnit.m in the handleInterruption: function by wrapping the call to setAllAudioSessionSettings/SetActive by checking if
self.audioUnitState == kAudioUnitIsStarted
This probably isn’t a great fix, but it seemed to work around my issue without other side effects.
Let me know what you think and if you have a better idea on how to solve this.
Wes