[Openal-devel] Openal Driver Issue on windows xp

Chris Robinson chris.kcat at gmail.com
Mon Nov 10 04:42:42 PST 2008


On Monday 10 November 2008 04:28:17 am slytron wrote:
> The sounds play but with no position or distance effect.
> Even with listen position 0,0,0 and orientation 0,1,0,0,0,1 and source
> postion 100,0,0 or 0,0,100 and AL_REFERENCE_DISTANCE 1.0 and
> AL_MAX_DISTANCE 2.0 and AL_ROLLOFF_FACTOR 1.0
> there is no attenuation of sound.

Is the sound mono or stereo? Stereo sounds won't position or get attenuated. 
Also, with the max distance set to 2, any source-listener distance beyond 2 
units won't attenuate farther.

A couple unrelated comments on the code, though..

> 	if( alcIsExtensionPresent(NULL, (ALCchar*)"AL_EXT_MP3") == AL_TRUE )

I wouldn't rely on this extension. AFAIK, the Windows version doesn't support 
it, and the new Linux version doesn't either. You're better off using an 
external lib to decode it and load/stream it with OpenAL (it may also be 
beneficial to use Vorbis instead of MP3, as its free-er and compresses 
better).

> 	m_poSndDevice = alcOpenDevice((ALchar*)"DirectSound3D");

And try not to hardcode device names like this. It may not always be 
available.


More information about the Openal-devel mailing list