best way to add background music?

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

  1. liptonlover macrumors 6502a

    Joined:
    Mar 13, 2008
    #1
    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

    Joined:
    Feb 12, 2008
    Location:
    Illinois
    #2
    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

    Joined:
    Mar 13, 2008
    #3
    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

    Joined:
    Sep 17, 2007
    Location:
    San Diego, CA
    #4
    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.

    Craig
     

Share This Page