[Openal-devel] Openal Driver Issue on windows xp

Chris Robinson chris.kcat at gmail.com
Mon Nov 10 06:30:38 PST 2008


On Monday 10 November 2008 05:40:37 am you wrote:
> Thanks Chris.. Yes, they were stereo sounds, I didn't know they had to
> be mono.. will be converting. I now hear some attenuation effect which
> is very encouraging. I thought AL_MAX_DISTANCE was max distance a sound
> could be heard. Thanks for the correction.

AL_MAX_DISTANCE is where sounds will stop attenuating. OpenAL's default 
attenuation model is logorithmic (it reduces by half when the distance 
doubles). The value of max distance doesn't affect how fast the rolloff 
occurs, just where it stops. So if you put max distance out at infinity, 
it'll attenuate no matter how far away it goes).

You can change the distance model to AL_LINEAR_DISTANCE_CLAMPED which will 
cause the rolloff to be calculated on a linear slope, from normal gain at 
reference distance, to 0 at max distance. This won't produce a very 
realistic-sounding rolloff, however.


More information about the Openal-devel mailing list