开发者

Cocos2d app with SimpleAudioEngine

开发者 https://www.devze.com 2023-03-30 20:38 出处:网络
I am developing a cocos2d IPhone app using the SimpleAudioEngine to play some mp3 sounds. My problem is that when I resume the app after a long time it is in background some sounds are no longer playe

I am developing a cocos2d IPhone app using the SimpleAudioEngine to play some mp3 sounds. My problem is that when I resume the app after a long time it is in background some sounds are no longer played. Have you ever experienced this? Do you kno开发者_如何学JAVAw if there is any way to fix it?

Thank you in advance

Andrea


Cocos2d retains/releases the [SimpleAudioEngine sharedEngine] and I don't think that you have control of this outside of the sharedEngine.

The key to this might be how you address in the appdelegate how your app resigns and becomes active.

It is not good to keep all your audio files in memory, especially if the app has been resigned for some time and thus, [SimpleAudioEngine sharedEngine] takes care of the memory management.

0

精彩评论

暂无评论...
验证码 换一张
取 消