mirror of https://github.com/axmolengine/axmol.git
AudioEngine:Fixed audio can not resume if it is interrupted cause by an incoming phone call.
This commit is contained in:
parent
42b24a9c5b
commit
e500b960f3
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue