[Openal] 2D and 3D

Garin Hiebert garinh at cheesetoast.net
Tue Oct 3 15:53:18 PDT 2006


> For 2D Audio I use:
>
> alSource3f(mSource,AL_POSITION,       0.0, 0.0, 0.0);
> alSource3f(mSource,AL_VELOCITY,       0.0, 0.0, 0.0);
> alSource3f(mSource,AL_DIRECTION,      0.0, 0.0, 0.0);
> alSourcef (mSource,AL_ROLLOFF_FACTOR, 0.0          );
> alSourcei (mSource,AL_SOURCE_RELATIVE,AL_TRUE      );
>
> So, Is there some default configuration for 3D Audio?
>   
Yes -- it's the same as what you have above, with an AL_ROLLOFF_FACTOR 
of 1.0f and AL_SOURCE_RELATIVE set to AL_FALSE.

Garin



More information about the Openal mailing list