best way to add background music?

Discussion in 'iOS Programming' started by liptonlover, Oct 31, 2008.

  1. liptonlover macrumors 6502a

    Mar 13, 2008
    What's the best way to have one .mp3 or .mp4 playing constantly, looping when needed, the whole time the user is in the application? What if I have multiple tracks? I know how to do this in a Mac application, but it seems to be different for an iPhone app.
    Thanks, Nate
  2. Niiro13 macrumors 68000

    Feb 12, 2008
    OpenAL's SoundEngine has a specific method for it: SoundEngine_LoadBackgroundMusic(stuff);

    And it loops. You can unload and load whenever you want, so if you have multiple tracks, then you can use those as well.
  3. liptonlover thread starter macrumors 6502a

    Mar 13, 2008
    Thanks, but I don't know where to download his engine. I found his site, but no sound engine. Also, would it just be in the form of a class or framework?

    Thanks, NAte
  4. cpatch macrumors member

    Sep 17, 2007
    San Diego, CA
    It's part of the CrashLanding sample app that you can download from the iPhone Dev Center. The app source code will show you how to use it.


Share This Page