I am trying to integrate background music into my cocos2d game using simple audio engine.
I use the playBackgroundMusic method of simple audio engine
here is the line of code I use:
[[SimpleAudioEngine sharedEngine]playBackgroundMusic:@"Soundtrack.mp3" loop:YES];
I also imported the SimpleAudioEngine header file. I have the code in my GameEngine class.
If you try to play
Soundtrack.mp3
make sure the file is actually namedSoundtrack.mp3
and notsoundtrack.mp3
orSoundTrack.mp3
.The iOS file system is case sensitive. The Mac's (Simulator's) file system is not. Ergo it will play on the Simulator but not on the device. Case matters.