[openal] distance model questions

Victorious dtvictorious at gmail.com
Mon May 11 01:44:31 EDT 2015


I've trying to set up openal-soft so that sounds are played properly depending on my current coordinate system. For example, I'd like sounds which are a distance of 0.5 and below from the listener to appear as if they are centred in the stereo field. Right now, if the listener is at (3.9, 3.9, 0.0) and a sound source is at (4.0, 4.0, 0.0), it still appears to come fairly far from the right. Hence, moving right from that position to somewhere just right of that sound causes a quick panning of the sound from right to left which I don't want. 

I'm using the default inverse distance clamped model. From the openal specification, it looks like the parameters I need to set are AL_REFERENCE_DISTANCE and AL_MAX_DISTANCE. I cant to get the desired effect though, so any help will be greatly appreciated.

On a related question, what does clamping do? And how does rolloff factor affect these calculations? i.e what does the default value of 1 mean? 

More information about the openal mailing list