i want to shuffle a dozen of songs in my game. Next song should not be the same as current song.
[[[SimpleAudioEngine sharedEngine] playBackgroundMusic: song];
There should be a loop and song should be randomized,
[[NSString stringWithFormat: @"song%i.mp3", arc4random() % 20 + 1];
//20 songs starting from song1.mp3
It would be great if the song will stop playing when the user's ipod music is playing. But the sound effect should still be available:
[[SimpleAudioEngine sharedEngine] playEffect: @"aaa.caf"]
Also, when the ipod music is playing, then launch the game, game music should not even be started.
How to implement this?