Search code examples
backgroundcocos2d-iphoneeffectsipodaudio

How to load/play music from the iPod library as background music in cocos2d? (iphone)


I'm currently using the SimpleAudioEngine to play a music file in my NSBundle (iphone) and it works. Now I want to let the user choose which music should be played as background music (it should loop if possible..or play a playlist) but while playing some music from the ipod library i want to play sound effects with simple audio engine..is this possible?

Some sample code would be great ;)

Thank you very much.


Solution

  • Take a look at the programming guide:

    http://developer.apple.com/library/ios/#documentation/Audio/Conceptual/iPodLibraryAccess_Guide/Introduction/Introduction.html#//apple_ref/doc/uid/TP40008765