OpenAL: Volume stays despite greater distance - no falloff
Hello everybody!
I have an issue about OpenAL:
A sound source is moving away from the listener - and initially you can hear how it's getting less intense. But then the volume stays at a certain level, although it is still moving away and should get quieter.
I tried all DisctanceModels, some AL_MAX_DISTANCEs, AL_REFERENCE_DISTANCEs, AL_MIN_GAIN and so on, but the output is always the same! (even alDistanceModel(AL_NONE) doesn't affect the sound output in any way; shouldn't there be no decrease at all when I use this?)
I hope somebody has an idea what I might have forgotten. The sample code for the initialization is:
// for the Soundsource:
//..
alSourcef (Source, AL_PITCH, 1.0f );
alSourcef (Source, AL_GAIN, 1.0f );
alSourcefv(Source, AL_POSITION, SourcePos);
alSourcefv(Source, AL_VELOCITY, SourceVel);
alSourcei (Source, AL_LOOPING, AL_TRUE );
alDistanceModel(AL_INVERSE_DISTANCE_CLAMPED);
alSourcef (Source, AL_MAX_DISTANCE, 2.0f);
alSourcef (Source, AL_REFERENCE_DISTANCE, 1.0f);
...
//and for the listener I tried:
alListenerf (AL_ROLLOFF_FACTOR, 01.05f);
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement