I'm having a hard time handling interruptions in my OpenGL ES 2.0 iOS app. This really pertains to OpenAL, which I think I know how to handle, but the issue is that my interrupt handler never ends up being called. I've tried registering for notifications with:
[[NSNotificationCenter defaultCenter] addObserver:self
selector:@selector(interruptionHandler:)
name:AVAudioSessionInterruptionNotification
object:nil];
among other methods (AVAudioPlayerDelegates
etc.).
On the iOS Simulator, if a user swipes down to bring up the Notification Center, or swipes up to bring up the Control Center, and then gets back into the app, the OpenAL code needs to be reset because it stops working. But, how do I capture these two interruptions?