AudioEngine:Fixed audio can not resume if it is interrupted cause by an incoming phone call.

This commit is contained in:
WenhaiLin 2015-09-07 16:29:57 +08:00
parent 42b24a9c5b
commit e500b960f3
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ void AudioEngineInterruptionListenerCallback(void* user_data, UInt32 interruptio
{
if ([[[UIDevice currentDevice] systemVersion] intValue] > 5) {
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:AVAudioSessionInterruptionNotification object:[AVAudioSession sharedInstance]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:UIApplicationDidBecomeActiveNotification object:[AVAudioSession sharedInstance]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handleInterruption:) name:UIApplicationDidBecomeActiveNotification object:nil];
}
else {
AudioSessionInitialize(NULL, NULL, AudioEngineInterruptionListenerCallback, self);