[Openal-devel] AL_EXT_source_distance_model revisit

Chris Robinson chris.kcat at gmail.com
Thu Oct 15 22:41:17 PDT 2009


On Thursday 15 October 2009 11:11:24 am Bob Aron wrote:
> • What happens when some of the sources are set to something other
> than the default and then the application calls alDistanceModel()?

All existing and newly-generated sources are set to the model given to 
alDistanceModel, regardless if anything specific was set on the source. 
Normally an app shouldn't use alDistanceModel if it's also using 
AL_EXT_source_distance_model (except perhaps to set a global default on 
initialization), so I don't think it really matters. Having alDistanceModel 
simply reset all sources seems to be the simplest method while maintaining 
backwards compatibility with code not aware of the extension. Especially since 
there would be no way to "unset" a specific model to make alDistanceModel 
affect it again.

> • What is the purpose of having different distance models for each
> source?

Different sounds may want different rolloff properties. For instance, some 
sounds may want to follow a more natural inverse distance rolloff, while 
others may want to use linear or a manual method to ensure reaching 0/min gain 
at max distance (without losing EFX air absorption).



More information about the Openal-devel mailing list