views:

267

answers:

1

I am trying to preload a bunch of background music files. Basically i am calling preloadBackgroundMusic several times. This breaks on me when i try it with SimpleAudioEngine :

[[SimpleAudioEngine sharedEngine] preloadBackgroundMusic:@"vitesse1.mp3"]; [[SimpleAudioEngine sharedEngine] preloadBackgroundMusic:@"vitesse1.mp3"];

but when I use CDAudioManager, I get leaks when i try to release the CDAudioManager object that was declared in my class:

CDAudioManager *localAm = [CDAudioManager sharedManager];
[localAm preloadBackgroundMusic:@"vitesse9.caf"];
[localAm preloadBackgroundMusic:@"vitesse10.caf"];
[localAm preloadBackgroundMusic:@"vitesse11.caf"];
[localAm release];

Anyone can shed some light or has expereinece something similiar?

+1  A: 

you can only preload once for background Music with SimpleAudioEngine however you can preload lots of effects.

goldplated