Re: Changing falloff curve in 3D mixer
Re: Changing falloff curve in 3D mixer
- Subject: Re: Changing falloff curve in 3D mixer
- From: Chris Rogers <email@hidden>
- Date: Fri, 13 Sep 2002 16:30:27 -0700
Hi Tim,
Currently there is no way to set this curve. I could add a property
implementing that in a future release, but for now you'll have to live
with the curve that is hard-coded into the algorithm. One possibility
you *could* try is to pre-scale the distance parameter by some non-linear
function before you send it to the 3D mixer. The trick would then be to
find the function which gives you the gain roll-off you desire.
This would also have an effect on the doppler effect, but may not be
a bad effect -- something you could try fairly easily in any case...
Chris Rogers
Core Audio Engineer
Apple Computer
(please be gentle, I'm no audio expert :)
The game I'm working on uses an audio library on Win32 that is
able to set the falloff of the volume. They give a min distance and
a volume. At or below that min distance the volume is played at the
given volume. At 2*min distance the volume is halved, etc.
Ignoring the fact that they give me a volume to start with, I
don't see a clear way of setting the relationship between distance,
nominal gain and perceived loudness in CoreAudio. There is
'kAudioUnitParameterUnit_MixerFaderCurve1' that makes me think that
there might be a way, but I'm not sure that this is applicable and I
don't see any parameter or property that uses this unit designation.
Is it possible to do this with the 3D mixer? Is there
documentation that I should look at? Most of the documentation
about the various parameters and properties is pretty terse. It
would be really nice if there was some documentation on the 3D mixer
that gave at least a basic overview of the various spatialization
algorithms, the math behind them and properties that can be used to
control the results.
Right now I'm adjusting the gain myself and then setting all
sounds at distance 1.0. Clearly this will prevent doppler from
working and will also probably mess up the higher quality
spatialization algorithms.
Thanks!
-tim
_______________________________________________
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.
_______________________________________________
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.