Suggestions for Sound Implementation...

Discussion in 'iOS Programming' started by Soulstorm, Apr 30, 2009.

  1. macrumors 68000

    Soulstorm

    Joined:
    Feb 1, 2005
    #1
    I am building a game which is actually a proof of concept that has the following capabilities as sound is concerned: I want it to play effects (2 or 3 effects simultaneously), to have looped sounds, and background music. What do you suggest using?

    I originally intended to use SoundEngine.h for my little game, but I see that many people have problems using it. So I would like to ask what capabilities does SoundEngine have?

    1) Can it play 2 or 3 effects simultaneously?
    2) Does it have any limitations on Sound formats?
    3) Can it fade in and out sounds?
    4) Can it be used with the simulator?

    Thank you in advance.
     
  2. macrumors 6502a

    Joined:
    Sep 3, 2005
    Location:
    Cramlington, UK
    #2
    Hi

    AudioServicesPlaySystemSound() is pretty easy to use and is ideal for short sound fxs. You can play multiple sounds at the same time - but you have no control over the audio level. For playing background music AVAudioPlayer is straightforward. You can control the audio level but if you want a fade you'll have to implement it yourself. AVAudioPlayer can play more that one track a at a time and can loop sounds. I don't think you can join sound loops seamlessly though - well I've tried and I get an audible gap.

    Both methods work with the simulator.

    There are other ways of handling audio but I haven't tried them.

    ß e n
     

Share This Page