]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/soundmgr.hxx
Updated --help message.
[flightgear.git] / src / Sound / soundmgr.hxx
index 3beb06949e3280c69f3b9429b244f6eaed2b42f6..c8809d0020c0a85ff12b42941403123f1830cf13 100644 (file)
 #include <plib/sl.h>
 #include <plib/sm.h>
 
+#include <simgear/timing/timestamp.hxx>
+
+#include <Main/fgfs.hxx>
+
 SG_USING_STD(map);
 SG_USING_STD(string);
 
@@ -80,25 +84,48 @@ typedef sound_map::iterator sound_map_iterator;
 typedef sound_map::const_iterator const_sound_map_iterator;
 
 
-class FGSoundMgr {
+class FGSoundMgr : public FGSubsystem
+{
 
     slScheduler *audio_sched;
     smMixer *audio_mixer;
     sound_map sounds;
 
+    SGTimeStamp last;
+    double safety;
+
 public:
 
     FGSoundMgr();
     ~FGSoundMgr();
 
-    // initialize the sound manager
-    bool init();
 
-    // run the audio scheduler
-    bool update();
+    /**
+     * Initialize the sound manager.
+     */
+    void init();
+
+
+    /**
+     * Bind properties for the sound manager.
+     */
+    void bind ();
+
+
+    /**
+     * Unbind properties for the sound manager.
+     */
+    void unbind ();
+
+
+    /**
+     * Run the audio scheduler.
+     */
+    void update(int dt);
+
 
     // is audio working?
-    inline bool is_working() const { return !audio_sched->not_working(); }
+    inline bool is_working() const { return !audio_sched->notWorking(); }
 
     // add a sound effect, return true if successful
     bool add( FGSimpleSound *sound, const string& refname );