From: ehofman Date: Fri, 16 Jul 2004 20:36:01 +0000 (+0000) Subject: Clip to volume to 1.0 if necessary. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=c9854153f82c8501dc629482404923e664a229d9;p=simgear.git Clip to volume to 1.0 if necessary. --- diff --git a/simgear/sound/xmlsound.cxx b/simgear/sound/xmlsound.cxx index 09e2eb04..83cb5d86 100644 --- a/simgear/sound/xmlsound.cxx +++ b/simgear/sound/xmlsound.cxx @@ -408,12 +408,13 @@ SGXmlSound::update (double dt) _sample->set_pitch( pitch_offset + pitch ); _sample->set_volume( volume_offset + volume ); -#if 0 - if ((pitch_offset + pitch) > 2.0) - cout << "WARNING: Pitch higher than 2.0 for configuration for '" << _name << "'"<< endl; -#endif if ((volume_offset + volume ) > 1.0) - cout << "WARNING: Volume larger than 1.0 for configuration for '" << _name << "'" << endl; + { + _sample->set_volume( 1.0 ); + SG_LOG(SG_GENERAL, SG_WARN, + "WARNING: Volume larger than 1.0 for configuration for '" << _name + << "' clipping ..."); + } //