iDevGames Forums
Background music and Sound FX on the Mac - Printable Version

+- iDevGames Forums (http://www.idevgames.com/forums)
+-- Forum: Development Zone (/forum-3.html)
+--- Forum: Graphics & Audio Programming (/forum-9.html)
+--- Thread: Background music and Sound FX on the Mac (/thread-9323.html)



Background music and Sound FX on the Mac - ipeku - Sep 5, 2011 06:38 AM

What is a good way to play background music in a game on the Mac? I need start, stop, volume control and maybe panning.

I know that AVAudioPlayer is available on Lion, but for earlier versions (10.5 and after), I'm looking at Audio Queue Services. Is this the right way to go?

Meanwhile, I'm using OpenAL for sound effects. Are there any possible conflicts with these two?

Thanks.


RE: Background music and Sound FX on the Mac - ThemsAllTook - Sep 5, 2011 11:56 AM

Any reason not to use OpenAL for both? Since you're already using it for sound effects, it seems to me like it'd be the logical choice.


RE: Background music and Sound FX on the Mac - ipeku - Sep 6, 2011 11:44 AM

The thing is I haven't done OpenAL Buffer Queuing before and I'm pressed for time. But now that you mentioned it I might actually go for that. Thanks.


RE: Background music and Sound FX on the Mac - skyhawk - Sep 6, 2011 11:49 AM

Give cocodenshion a try. Took me about 1 minute to set it up, and 1 minute to data drive all my audio


RE: Background music and Sound FX on the Mac - ipeku - Sep 6, 2011 01:11 PM

Does it do low latency sound effects also?


RE: Background music and Sound FX on the Mac - skyhawk - Sep 6, 2011 04:54 PM

(Sep 6, 2011 01:11 PM)ipeku Wrote:  Does it do low latency sound effects also?

yes (though I personally have not tried it for that)


RE: Background music and Sound FX on the Mac - ipeku - Sep 7, 2011 02:44 AM

sounds good. I researched a little and it's supposedly built right on top of OpenAL. Still, I wasn't sure where to get the official package. Is there a central place to get it or a forum of people using it (if I run into trouble)?

thanks!


RE: Background music and Sound FX on the Mac - skyhawk - Sep 7, 2011 08:58 AM

grab cocos2d. it comes with it


RE: Background music and Sound FX on the Mac - ipeku - Sep 7, 2011 11:07 AM

I'll check it out. Thanks!


RE: Background music and Sound FX on the Mac - ipeku - Sep 26, 2011 06:50 AM

I finally went for OpenAL both soundFX and music. It took me 6 hours to get the streaming going and I'm glad I did that. It's pretty simple in the end.