#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);
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 );