]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/beacon.cxx
Make the sound-manager optional in a few places.
[flightgear.git] / src / Sound / beacon.cxx
index de9a98915131516c05952013a89cf93b32a889f1..689922932b4bfb15a3a7321a2b146b5b7c14bb31 100644 (file)
 // along with this program; if not, write to the Free Software
 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
-// $Id$
-
 
 #include <stdlib.h>
 #include <cstring>
 
 #include "beacon.hxx"
 
+#include <simgear/sound/sample_openal.hxx>
 #include <simgear/structure/exception.hxx>
+#include <simgear/debug/logstream.hxx>
 
 // constructor
 FGBeacon::FGBeacon()
@@ -104,3 +104,14 @@ bool FGBeacon::init() {
 
     return true;
 }
+
+FGBeacon * FGBeacon::_instance = NULL;
+
+FGBeacon * FGBeacon::instance()
+{
+    if( _instance == NULL ) {
+        _instance = new FGBeacon();
+        _instance->init();
+    }
+    return _instance;
+}