DevMaster.net Forums
[[ Home | Forums | 3D Engines Database | Wiki | Articles/Tutorials | Game Dev Jobs | IRC Chat Network | Contact Us ]]

Go Back   DevMaster.net Forums > Programming & Development > Sound and Music Programming
User Name
Password
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Search this Thread Display Modes
Old 03-02-2004, 12:10 PM   #1
pisces
New Member
 
Join Date: Mar 2004
Posts: 4
Default

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.
pisces is offline   Reply With Quote
Old 03-02-2004, 04:12 PM   #2
Noor
Senior Member
 
Join Date: Jan 2003
Location: ON, Canada
Posts: 524
Default

I'm not the person to ask, but in the meanwhile, I found this site for you:

http://www.jcabs-rumblings.com/OpenALFeatures.html

It talks about the volume control issue.

I hope it helps
___________________________________________
"What ever happened to happily ever after?"
Noor is offline   Reply With Quote
Old 03-03-2004, 01:18 PM   #3
SpreeTree
Valued Member
 
SpreeTree's Avatar
 
Join Date: Jan 2004
Location: England
Posts: 265
Default

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
Code:
// 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
SpreeTree is offline   Reply With Quote
Old 03-03-2004, 08:53 PM   #4
pisces
New Member
 
Join Date: Mar 2004
Posts: 4
Default

Ok thanks alot for the replies...
I was kinda expecting something like
alSetVolume(Source, Volume level) or something
pisces is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Forum Jump


All times are GMT -7. The time now is 06:48 AM.


Powered by vBulletin
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.