]> git.mxchange.org Git - flightgear.git/commitdiff
commradio: no spoken atis if sound disabled
authorTorsten Dreyer <torsten@t3r.de>
Wed, 30 Apr 2014 08:50:57 +0000 (10:50 +0200)
committerTorsten Dreyer <torsten@t3r.de>
Wed, 30 Apr 2014 08:50:57 +0000 (10:50 +0200)
src/Instrumentation/commradio.cxx

index 20114289bfe4ef7807086ab0b94b965127e5a5bd..bff1b85a273b330923d72993c2796e3dcb2660dc 100644 (file)
@@ -64,6 +64,7 @@ public:
   {
     return _spokenAtis.empty() == false;
   }
+
   SGSharedPtr<SGSoundSample> getSpokenAtis()
   {
     return _spokenAtis.pop();
@@ -84,6 +85,9 @@ AtisSpeaker::~AtisSpeaker()
 }
 void AtisSpeaker::valueChanged(SGPropertyNode * node)
 {
+  if( !fgGetBool("/sim/sound/working", false ) )
+    return;
+
   string newText = node->getStringValue();
   if (_synthesizeRequest.text == newText) return;