Hello everyone,
I've recently started to have troubles with my iOS audio apps. All apps concerned are based on AUGraph with a unique AudioUnit RemoteIO, sending output audio through a custom render callback (basic scheme you can find on several sample codes and guides from Apple documentation).
Sometimes, though rarely, the physical audio output simply shuts down, apparently for no reason, while the render callback continues to be called as normal.
I'm still struggling to identify a reproducible scenario. I already saw it happen with a sound generating app (AVAudioSessionCategoryPlayback) on background, without anything happening. I found a way to restart audio (without restarting the app) by resetting
- the AudioSession's category, buffer duration and sample rate,
- and the stream format of the Bus 0 input on the RemoteIO Audio Unit.
But still, I don't know :
- Why this happens? It seems that the AudioSession and/or RemoteIO enter in some kind of weird state which prevents them to work properly.
- How to get noticed when this happens.
- How to prevent this to happen (which is the most important obviously)?
Does anyone have any clue on what happens here?
Thank you all for your help 🙂
Best,
😎 Tom 😎