From 55c1ac36e3d05b436d0cb9b6aa8276badb86eaf3 Mon Sep 17 00:00:00 2001 From: mfranz Date: Thu, 20 Mar 2008 17:20:54 +0000 Subject: [PATCH] - warnings-- - 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 | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 1dfe62ab..efd8d2ad 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -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 -- 2.39.5