Reputation: 742
I want Continuously Background Music in my one of level, I am looping my Audio File like Following Ways :
[[SimpleAudioEngine sharedEngine] playBackgroundMusic:@"mymusic.mp3" loop:YES];
& I also tried This way :
[[CDAudioManager sharedManager] playBackgroundMusic:@"AirRaidSirens.mp3" loop:YES];
I guess it should continuously play in loop While loop:YES But its not working.
I also tried By preloading my sound effect.But,its not working by Both ways.I dont know why!.. Please help.
Upvotes: 0
Views: 384
Reputation: 185
Personally I use OALSimpleAudio for music and sound effects inside my projects. It always works and if you try to loop or preload you can do with few code.
//access audio object
OALSimpleAudio *audio = [OALSimpleAudio sharedInstance];
// play background sound
[audio playBg:@"your-file-name.mp3" loop:TRUE];
Upvotes: 1