]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/morse.cxx
Fix MSVC compilation
[flightgear.git] / src / Sound / morse.cxx
index 855d7b2651b052c0c23ef7b7915c954f3641d02f..754c98eb3be201903ebe809160cf1f65277a238b 100644 (file)
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
 
 #include <simgear/constants.h>
 
+#include <Main/fg_props.hxx>
+#include <Main/globals.hxx>
+
 #include "morse.hxx"
 
 
@@ -167,6 +170,11 @@ bool FGMorse::cust_init(const int freq ) {
 
 // make a SGSoundSample morse code transmission for the specified string
 SGSoundSample *FGMorse::make_ident( const string& id, const int freq ) {
+
+    if (globals->get_soundmgr()->is_working() == false) {
+       return 0;
+    }
+
     char *idptr = (char *)id.c_str();
 
     int length = 0;