Hiya all... I am quite new to OpenAL, I've been through the tutorials but havent noticed any way to control the volume of the source without having to use the fading effect.
Is there any way to control volume per source in OpenAL at all?
Thanks.
Volume Control
Started by pisces, Mar 02 2004 07:10 PM
3 replies to this topic
#1
Posted 02 March 2004 - 07:10 PM
#2
Posted 02 March 2004 - 11:12 PM
I'm not the person to ask, but in the meanwhile, I found this site for you:
http://www.jcabs-rum...ALFeatures.html
It talks about the volume control issue.
I hope it helps
http://www.jcabs-rum...ALFeatures.html
It talks about the volume control issue.
I hope it helps
"What ever happened to happily ever after?"
#3
Posted 03 March 2004 - 08:18 PM
In OpenAL gain means volume. So you have to change the AL_GAIN state to change the volume of a source (you can't change the volume of a buffer as far as I have seen, and it seems strange why you would).
So
You can set a value of higher than 1.0f, which will (on some cards i think) increase the volume of the source past the volume of the buffer applied to it.
Hope that helps
Spree
So
// To set the volume of the source to max alSourcef(sourceID, AL_GAIN, 1.0f); // To set it to min alSourcef(sourceID, AL_GAIN, 0.0f); // And halfway alSourcef(sourceID, AL_GAIN, 0.5f);etc etc.
You can set a value of higher than 1.0f, which will (on some cards i think) increase the volume of the source past the volume of the buffer applied to it.
Hope that helps
Spree
#4
Posted 04 March 2004 - 03:53 AM
Ok thanks alot for the replies...
I was kinda expecting something like
alSetVolume(Source, Volume level) or something ;)
I was kinda expecting something like
alSetVolume(Source, Volume level) or something ;)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











