]> git.mxchange.org Git - simgear.git/commitdiff
- warnings--
authormfranz <mfranz>
Thu, 20 Mar 2008 17:20:54 +0000 (17:20 +0000)
committermfranz <mfranz>
Thu, 20 Mar 2008 17:20:54 +0000 (17:20 +0000)
- make one-shot sounds subject to volume and pitch control (To get
  constant volume/pitch during the whole lifetime, just *configure*
  the sound that way.)

simgear/sound/xmlsound.cxx

index 1dfe62ab9af581c6741a957f230d38210668500d..efd8d2ad8666cdd59113fb08382d217071e3c1c7 100644 (file)
@@ -326,8 +326,7 @@ SGXmlSound::update (double dt)
    }
 
    //
-   // If the mode is ONCE and the sound is still playing,
-   //  we have nothing to do anymore.
+   // mode is ONCE and the sound is still playing?
    //
    if (_active && (_mode == SGXmlSound::ONCE)) {
 
@@ -338,16 +337,16 @@ SGXmlSound::update (double dt)
          _dt_play += dt;
       }
 
-      return;
-   }
+   } else {
 
-   //
-   // Update the playing time, cache the current value and
-   // clear the delay timer.
-   //
-   _dt_play += dt;
-   _prev_value = curr_value;
-   _stopping = 0.0;
+      //
+      // Update the playing time, cache the current value and
+      // clear the delay timer.
+      //
+      _dt_play += dt;
+      _prev_value = curr_value;
+      _stopping = 0.0;
+   }
 
    //
    // Update the volume