PDA

View Full Version : Suggestions for Sound Implementation...




Soulstorm
Apr 30, 2009, 06:04 AM
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.



lazydog
Apr 30, 2009, 08:17 AM
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