[Openal-devel] Another extension proposal
Chris Robinson
chris.kcat at gmail.com
Tue Sep 16 23:06:44 PDT 2008
Since Daniel mention that per-source rolloffs are sometimes viewed as
critical, and I'd likely need the functionality anyway, here's a simpler (I
hope) proposal. Suggestions on the name, and anything else, welcome.
Name
EXT_source_distance_model
Name Strings
AL_EXT_source_distance_model
Version
1.0
Number
??
Dependancies
This extension is written against the OpenAL 1.1 specification.
Overview
This extension allows each source to specify a distance model, instead of
being restricted to one distance model for every source in the context. It
provides a mechanism for applications to apply different models to each
source, without the burden of manually applying the attenuation through
the the source gain.
Issues
Q: What should this extension be called?
A: EXT_source_distance_model is a bit clunky, but it does portray the
intended functionality; allowing the distance model to be specfied for
the source, instead of the context.
New Procedures and Functions
None.
New Tokens
None.
Additions to Specification
Modify Table 3.1 (Numerical Query Definitions), p. 22
Name Description
----------------- -----------------
...
AL_DISTANCE_MODEL The current default distance model
Modify Section 3.4 (Attenuation By Distance), p. 24
(modify starting from third paragraph)
OpenAL currently supports three modes of operation with respect to
distance attenuation, including one that is similar to the IASIG I3DL2
model. The application can choose one of these models (or chooses to
disable distance-dependent attenuation) on a per-source basis. The
function
void alDistanceModel(ALenum modelName);
changes the distance model used by all sources in the current context, as
well as specifies the default model new sources will be set to. Legal
arguments are: ...
Modify Section 4.3.2 (Source Attributes)
(add to subsection Distance Model Attributes, p. 38)
Table 4.x: DISTANCE_MODEL Attribute
Name Signature Values Default
----------------- --------- --------- ---------------------------
AL_DISTANCE_MODEL i, iv any valid AL_INVERSE_DISTANCE_CLAMPED
modelName
Description: the distance model used when calculating the source's
distance-based rolloff. By default, new sources will be set to
AL_INVERSE_DISTANCE_CLAMPED. Calling alDistanceModel, however, will modify
the default value new sources are set to, as well as modify the current
value of existing sources.
Errors
None.
More information about the Openal-devel
mailing list