]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/fg_fx.cxx
Add a *really* crude model of ITT, Oil Temp, and Oil Pressure. This
[flightgear.git] / src / Sound / fg_fx.cxx
index 4db24d88ed7722e594ec0e4ae3d7637d49ee16ab..97223c951d76233bff7669711fb600a1153eeb74 100644 (file)
@@ -3,7 +3,7 @@
 // Started by David Megginson, October 2001
 // (Reuses some code from main.cxx, probably by Curtis Olson)
 //
-// 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
@@ -40,6 +40,8 @@
 
 
 FGFX::FGFX () :
+    _volume( fgGetNode("/sim/sound/volume") ),
+    _pause( fgGetNode("/sim/sound/pause") ),
     last_pause( true ),
     last_volume( 0.0 )
 {
@@ -108,7 +110,7 @@ void
 FGFX::update (double dt)
 {
     // command sound manger
-    bool pause = fgGetBool("/sim/sound/pause");
+    bool pause = _pause->getBoolValue();
     if ( pause != last_pause ) {
         if ( pause ) {
             globals->get_soundmgr()->pause();
@@ -118,7 +120,7 @@ FGFX::update (double dt)
         last_pause = pause;
     }
 
-    double volume = fgGetDouble("/sim/sound/volume");
+    double volume = _volume->getDoubleValue();
     if ( volume != last_volume ) {
         globals->get_soundmgr()->set_volume( volume );        
         last_volume = volume;