]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/soundmgr_openal.hxx
Frederic Bouvier:
[simgear.git] / simgear / sound / soundmgr_openal.hxx
index 3f7c4cbd1e767075ab87c29ed20b59da9b340b84..70489973636c9ee7b482343b7b5f9122936f5c37 100644 (file)
@@ -5,7 +5,7 @@
 //
 // C++-ified by Curtis Olson, started March 2001.
 //
-// Copyright (C) 2001  Curtis L. Olson - curt@flightgear.org
+// Copyright (C) 2001  Curtis L. Olson - http://www.flightgear.org/~curt
 //
 // This program is free software; you can redistribute it and/or
 // modify it under the terms of the GNU General Public License as
@@ -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)
      */