Re: Core Audio for a Game Engine
Re: Core Audio for a Game Engine
- Subject: Re: Core Audio for a Game Engine
- From: Brian Greenstone <email@hidden>
- Date: Wed, 20 Aug 2003 09:39:56 -0500
on 8/20/03 9:18 AM, David Duncan at email@hidden wrote:
>
output, and one mixer unit connected to the reverb. The mixer unit
>
would be configured to mix n channels of audio for which you could
>
provide your inputs on.
How does one go about configuring it that way? I don't see any settings for
that anywhere.
>
Volume is a parameter on the mixer's input side (i.e. a parameter for
>
each element going into the mixer).
You mean like each sample? In the sample code that I used as my starting
point they were manually calculating the volume of each sample in the
callback function. However, this doesn't really work because it would only
change the volume when the current buffer is exhausted and new data is
copied in. For games, the volume change needs to be instantaneous, so
there's got to be a way to change the volume of the playback unit itself and
not just by tweaking the sample values.
>
Pitch is harder as I don't believe
>
there is a built in pitch changer audio unit (and on such a unit you
>
would just change a parameter on it and feed it's output to the mixer).
Yeah, that's why Core Audio baffles me. Pitch changes are a fundamental
part of any game's audio system, yet there doesn't appear to be any way to
do it in Core Audio.
>
As for why your property calls aren't having effect, all I can say is
>
to check the return value - you should be getting some error if it is
>
rejecting your changes. And if your not getting an error, it could be
>
an AU further upstream that is reconfiguring an internal Audio
>
Converter (such as the Output Unit which does this for sample rate
>
conversion if you specify a rate that the hardware doesn't support).
Depending on which Unit I mess with I get different results. If I mess with
the Output Unit I get a "Modifications not allowed" error, but if I modify
the Mixer Unit, I get no errors, but nothing happens.
Seems that Core Audio still has a long way to go (in terms of documentation,
sample code, and high level calls). I guess right now it's really just a
low level thing for people writing audio drivers and such. Seems that I
should probably stick with using Sound Manager for actually playing sounds.
-B
_________________________________________________________
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.