From: curt Date: Fri, 14 May 2004 15:49:10 +0000 (+0000) Subject: Code at this level shouldn't care if the sound manager is paused or not. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=ec8c167a274b7d9ab66a0ebbfbca4bfd51aaa533;p=flightgear.git Code at this level shouldn't care if the sound manager is paused or not. Just forge ahead as if sound is playing, let the sound manger worry about the details. --- diff --git a/src/ATC/AIPlane.cxx b/src/ATC/AIPlane.cxx index 272f4e73b..97789d7d2 100644 --- a/src/ATC/AIPlane.cxx +++ b/src/ATC/AIPlane.cxx @@ -183,8 +183,7 @@ void FGAIPlane::ProcessCallback(int code) { // The repeating flag indicates whether the message should be repeated continuously or played once. void FGAIPlane::Render(string refname, bool repeating) { #ifdef ENABLE_AUDIO_SUPPORT - voice = (voiceOK && fgGetBool("/sim/sound/audible") - && fgGetBool("/sim/sound/voice")); + voice = (voiceOK && fgGetBool("/sim/sound/voice")); if(voice) { int len; unsigned char* buf = vPtr->WriteMessage((char*)pending_transmission.c_str(), len, voice); diff --git a/src/ATC/ATC.cxx b/src/ATC/ATC.cxx index 47f9bba31..8634de024 100644 --- a/src/ATC/ATC.cxx +++ b/src/ATC/ATC.cxx @@ -217,8 +217,7 @@ void FGATC::SetData(ATCData* d) { // The repeating flag indicates whether the message should be repeated continuously or played once. void FGATC::Render(string msg, string refname, bool repeating) { #ifdef ENABLE_AUDIO_SUPPORT - voice = (voiceOK && fgGetBool("/sim/sound/audible") - && fgGetBool("/sim/sound/voice")); + voice = (voiceOK && fgGetBool("/sim/sound/voice")); if(voice) { int len; unsigned char* buf = vPtr->WriteMessage((char*)msg.c_str(), len, voice); diff --git a/src/ATC/ATCmgr.cxx b/src/ATC/ATCmgr.cxx index 3a4719772..6f8b911aa 100644 --- a/src/ATC/ATCmgr.cxx +++ b/src/ATC/ATCmgr.cxx @@ -117,9 +117,10 @@ void FGATCMgr::init() { voiceOK = v1->LoadVoice("default"); voice = true; - /* I've loaded the voice even if /sim/sound/audible is false + /* I've loaded the voice even if /sim/sound/pause is true * since I know no way of forcing load of the voice if the user - * subsequently switches /sim/sound/audible to true. */ + * subsequently switches /sim/sound/audible to true. + * (which is the right thing to do -- CLO) :-) */ #else voice = false; #endif