如何在 cocos2d 中异步预加载 mp3 背景音乐文件?喜欢纹理
[[CCTextureCache sharedTextureCache] addImageAsync:@"textures.png" target:self selector:@selector(textureLoaded:)];
我只搜索这个解决方案
SimpleAudioEngine *sae = [SimpleAudioEngine sharedEngine];
if (sae != nil) {
[sae preloadBackgroundMusic:@"mula_tito_on_timbales.mp3"];
if (sae.willPlayBackgroundMusic) {
sae.backgroundMusicVolume = 0.5f;
}
}