[Openal] OpenAL Basics

SamuelSmith samuel_smith2000 at hotmail.com
Tue Apr 10 14:50:26 PDT 2007


How do I go about returning the result of the distance model calculation (the
gain)?

What I have done (in the display function of my C++/OpenGL/OpenAL project):

ALfloat gain = 0;
alGetSourcef(Source[0], AL_GAIN, &gain);
cout<<"GAIN "<<gain<<endl;

(Source[0] is the source in the array of sources, such as: alSourcef
(Source[i], AL_GAIN,     0.5      );)

For some reason my result is always 0.5 (the value originally given to the
source in the LoadALData function) and this value never changes no matter
what the difference in distance is between the listener and source and I can
clearly hear the change of volume in the sound.
-- 
View this message in context: http://www.nabble.com/OpenAL-Basics-tf3272849.html#a9929426
Sent from the OpenAL - User mailing list archive at Nabble.com.



More information about the Openal mailing list