[Openal] Directional source
Garin Hiebert
garinh at cheesetoast.net
Tue May 30 12:17:29 PDT 2006
You'll probably want to grab some graph paper and map the models out
yourself, but here's the quickie explanation of the parameters for all
the models:
For all *_CLAMPED versions:
-- distances above AL_MAX_DISTANCE get the gain at distance =
AL_MAX_DISTANCE
-- distances below AL_REFERENCE_DISTANCE get the gain at distance =
AL_REFERENCE_DISTANCE
For the inverse distance model:
AL_ROLLOFF_FACTOR -- sets the slope ( default is 1 -- going larger
increases the slope, going lower decreases the slope)
AL_REFERENCE_DISTANCE -- the point where the gain is 1
AL_MAX_DISTANCE -- no influence unless using the clamped version of this
model
For the linear model:
AL_ROLLOFF_FACTOR -- sets the slope
AL_REFERENCE_DISTANCE -- the point where the gain is 1
AL_MAX_DISTANCE -- the point where the gain becomes zero
For the exponential model:
AL_ROLLOFF_FACTOR -- sets the formula used to determine the slope
-- the default of 1 gives the same slope as the default inverse
distance model (1/x), 2 would be a 1/x^2 model (physically realistic), etc.
AL_REFERENCE_DISTANCE -- the point where the gain is 1
AL_MAX_DISTANCE -- no influence unless using the clamped version of the
model
In summary:
The reference distance is used everywhere to determine where the gain
should be at unity. The rolloff factor affects how steep the falloff is
going to be from the reference distance. The max distance -- if it has
an influence -- is either used as a clamp or sets where the gain becomes
zero (linear model only).
Garin
Garin
More information about the Openal
mailing list