]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/kr_87.cxx
Refactor morse and beacon as singleton
[flightgear.git] / src / Instrumentation / kr_87.cxx
index 30c0cbe6694270b0a6fa6ffc034672b4c7d79435..9b91babead8305fb9882a28fede67b2b0a4028de 100644 (file)
@@ -36,6 +36,7 @@
 
 #include "kr_87.hxx"
 
+#include <Sound/morse.hxx>
 #include <string>
 using std::string;
 
@@ -119,7 +120,6 @@ void FGKR_87::init () {
     SGSoundMgr *smgr = globals->get_soundmgr();
     _sgr = smgr->find("avionics", true);
     _sgr->tie_to_listener();
-    morse.init();
 }
 
 
@@ -534,7 +534,7 @@ void FGKR_87::search() {
                _sgr->remove( "adf-ident" );
            }
            SGSoundSample *sound;
-           sound = morse.make_ident( trans_ident, LO_FREQUENCY );
+        sound = FGMorse::instance()->make_ident( trans_ident, LO_FREQUENCY );
            sound->set_volume( 0.3 );
            _sgr->add( sound, "adf-ident" );