[Openal] 3D Sound
jdaly at ist.ucf.edu
Thu Nov 1 10:49:26 PDT 2007
Leben Ojanen wrote:
> Hi everyone. I've got a small problem that I think the community here
> can definitely clear up for me.
> I'm working on a 3d kart battle game and I've used OpenAL to implement
> some 3d positional sound. Everything works great, except for the fact
> sounds are not heard by the player unless they are right next to
> objects emitting the sounds.
> How can I correctly increase the range that the sounds are heard at?
You need to set AL_REFERENCE_DISTANCE, AL_MAX_DISTANCE, and
AL_ROLLOFF_FACTOR to values that make sense for your application. You
may or may not also want to use a different distance model than the
default. Look at the spec to see how the various distance models and
the parameters work:
More information about the Openal