From d1f5f04423c17d91f8de31e6003a049796f70a6b Mon Sep 17 00:00:00 2001 From: david Date: Thu, 3 Oct 2002 21:21:44 +0000 Subject: [PATCH] Have update check that sound is enabled. --- src/Sound/fg_fx.cxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index f8d05d4c2..c7c7a17d7 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -64,7 +64,7 @@ FGFX::init() path.append(path_str.c_str()); SG_LOG(SG_GENERAL, SG_INFO, "Reading Instrument " << node->getName() - << " from " << path.str()); + << " from " << path.str()); SGPropertyNode root; try { @@ -97,8 +97,10 @@ FGFX::unbind () void FGFX::update (double dt) { - for (unsigned int i = 0; i < _sound.size(); i++ ) - _sound[i]->update(dt); + if (fgGetBool("/sim/sound/audible")) { + for (unsigned int i = 0; i < _sound.size(); i++ ) + _sound[i]->update(dt); + } } // end of fg_fx.cxx -- 2.39.5