Core Audio for a Game Engine
Core Audio for a Game Engine
- Subject: Core Audio for a Game Engine
- From: Brian Greenstone <email@hidden>
- Date: Wed, 20 Aug 2003 08:41:35 -0500
I'm in the process of converting my game engine to use Core Audio instead of
Sound Manager, but I'm having some difficulty since there's not much
documentation and sample code for Core Audio. I'm hoping someone can help
me with two fundamental questions:
1. So, say I was 30 sound effects channels in my game engine. If I
understand things correctly then I need to create 30 separate
Mixer/Reverb/Output Units via:
gAudioUnit_Mixer[i] = (AudioUnit)OpenComponent(compid);
gAudioUnit_Reverb[i] = (AudioUnit)OpenComponent(compid);
gAudioUnit_Output = (AudioUnit)OpenDefaultComponent(kAudioUnit...
...
That's basically what I've got in there now which seems to work and let me
play an effect. The confusing thing is that it seems I can play multiple
simultaneous effects on that same unit, but there doesn't seem to be any way
to track or modify the effects playing on the unit. Which leads me to
question #2...
2. How in the world do you change the pitch and volume of a playing sound
effect? I've found nothing in any documentation or sample code about this,
and I'm totally baffled. I've seen that I can use AudioUnitGetProperty() to
get the sample rate and other info about the Unit, but modifying any of the
data and calling AudioUnitSetProperty() seems to have zero effect.
Thanks-
-Brian
_________________________________________________________
Brian Greenstone
President & CEO email@hidden
Pangea Software, Inc.
http://www.pangeasoft.net
12405 John Simpson Court voice/fax: (512)266-9991
Austin, TX 78732
_________________________________________________________
_______________________________________________
coreaudio-api mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/coreaudio-api
Do not post admin requests to the list. They will be ignored.