[Openal] OpenAL Basics
Daniel PEACOCK
dpeacock at creativelabs.com
Tue Apr 10 15:22:05 PDT 2007
Hi Samuel,
As you've noticed you are just retrieving the Source's Gain parameter level
(which is always the same value as you set). There is no way to retrieve
the *post-attenuation* gain level from OpenAL. If you need this
information, you will have to compute it yourself (formulas are in the AL
Spec.).
Dan
Notice
The information in this message is confidential and may be legally
privileged. It is intended solely for the addressee. Access to this
message by anyone else is unauthorized. If you are not the intended
recipient, any disclosure, copying or distribution of the message, or
any action taken by you in reliance on it, is prohibited and may be
unlawful. If you have received this message in error, please delete it
and contact the sender immediately. Thank you.
SamuelSmith
<samuel_smith2000
@hotmail.com> To
Sent by: openal at opensource.creative.com
openal-bounces at op cc
ensource.creative
.com Subject
Re: [Openal] OpenAL Basics
04/10/2007 02:50
PM
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.
_______________________________________________
Openal mailing list
Openal at opensource.creative.com
http://opensource.creative.com/mailman/listinfo/openal
ForwardSourceID:NT0003F25E
More information about the Openal
mailing list