Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

Soulstorm

macrumors 68000
Original poster
Feb 1, 2005
1,887
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.
 
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
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.