I get really confused on how to handle AVAudioSession notifications to satisfy the expectation of FMOD Studio on iOS.
I had a look at
common_platform.mm found in the examples provided with Fmod Studio API. I find it listens to many
AVAudioSession notifications, but all of them are simply printing logs without doing anything real. Even for
AVAudioSessionInterruptionNotification where it calls
gSuspendCallback, I find
gSuspendCallback is not set anywhere. Does that mean I’m NOT expected to do anything with these notifications?
In contrast, the documentation explicitly says I should (or might? ) call
addObserverForName:AVAudioSessionInterruptionNotification. I cannot find any call to these two functions in example code.
So should I call anything into FMOD for
AVAudioSession notifications? Especially, how should I properly handle
AVAudioSessionMediaServicesWereResetNotification? Do I need to suspend or resume or reset anything of FMOD?
Is there example code that actually handles those notifications?