Add a function to globally set volume (aka AL_GAIN)
This commit is contained in:
@@ -174,6 +174,16 @@ public:
|
||||
*/
|
||||
bool stop( const string& refname );
|
||||
|
||||
/**
|
||||
* set overall volume for the application.
|
||||
* @param vol 1.0 is default, must be greater than 0
|
||||
*/
|
||||
inline void set_volume( const ALfloat vol ) {
|
||||
if ( vol > 0.0 ) {
|
||||
alListenerf( AL_GAIN, vol );
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* set the position of the listener (in opengl coordinates)
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user