CoreAudio/iOS: Recover from audio session interruptions


On iOS, the only signal Qt observed about the shared AVAudioSession
was QGuiApplication::applicationStateChanged, which never fires when
the OS suspends or resumes the audio stream on its own, leaving
QAudioSink/QAudioSource stuck in ActiveState with QAudio::NoError
while producing no audio. Subscribe to QAVAudioSessionManager and map
its notifications onto stream state: a suspend leaves the AudioUnit
untouched so the ringbuffer and QIODevice wiring survive it and can
resume automatically once the OS allows it (otherwise only via an
explicit resume() or a later application activation), while a lost
or reset media server reports QAudio::IOError/StoppedState rather
than being silently reopened.

Fixes: QTBUG-145999
Pick-to: 6.12 6.12.0
Change-Id: I835350c5966310768d7638f20586c40a68418b2e
Reviewed-by: Nils Petter Skålerud <nils.petter.skalerud@qt.io>
commit32900d06eeabd36f1d7844f05b1faaad5e3f3e89
parentb0c172015c974932f49ab25b0534daa0bf07d5cc
authorTim Blechmann <tim.blechmann@qt.io>
committerNils Petter Skålerud <nils.petter.skalerud@qt.io>
commit timeWed, 9 Sep 2026 10:10:06 +0000