diff --git a/cocos/audio/ios/CocosDenshion.m b/cocos/audio/ios/CocosDenshion.m index bc3a995766..4df6b2a472 100644 --- a/cocos/audio/ios/CocosDenshion.m +++ b/cocos/audio/ios/CocosDenshion.m @@ -258,6 +258,7 @@ static BOOL _mixerRateSet = NO; device = alcGetContextsDevice(currentContext); //Release context CDLOGINFO(@"Denshion::CDSoundEngine - destroy context."); + alcMakeContextCurrent(NULL); alcDestroyContext(currentContext); //Close device CDLOGINFO(@"Denshion::CDSoundEngine - close device."); diff --git a/cocos/audio/mac/CocosDenshion.m b/cocos/audio/mac/CocosDenshion.m index 8e8cd9c8cc..028ea84042 100644 --- a/cocos/audio/mac/CocosDenshion.m +++ b/cocos/audio/mac/CocosDenshion.m @@ -259,6 +259,7 @@ static BOOL _mixerRateSet = NO; device = alcGetContextsDevice(currentContext); //Release context CDLOGINFO(@"Denshion::CDSoundEngine - destroy context."); + alcMakeContextCurrent(NULL); alcDestroyContext(currentContext); //Close device CDLOGINFO(@"Denshion::CDSoundEngine - close device.");