]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/sample_queue.hxx
Avoid nuisance sound effects after sim-reset.
[flightgear.git] / src / Sound / sample_queue.hxx
index c874ae3eb2eada42a9c0d0c3f145ef5b32a97369..3f51104eec2c40ddb41effcb1dba1d09879f0f87 100644 (file)
@@ -29,6 +29,7 @@
 #include <queue>
 
 #include <simgear/structure/subsystem_mgr.hxx>
+#include <simgear/props/props.hxx>
 #include <simgear/sound/sample_group.hxx>
 
 class SGSoundSample;
@@ -38,8 +39,8 @@ class SGSoundSample;
  *
  *    This modules maintains a queue of 'message' audio files.  These
  *    are played sequentially with no overlap until the queue is finished.
- *    This second mechanims is useful for things like tutorial messages or
- *    background atc chatter.
+ *    This second mechanisms is useful for things like tutorial messages or
+ *    background ATC chatter.
  */
 class FGSampleQueue : public SGSampleGroup
 {
@@ -51,16 +52,16 @@ public:
 
     virtual void update (double dt);
 
-    inline void add (SGSoundSample *msg) { _messages.push(msg); }
+    inline void add (SGSharedPtr<SGSoundSample> msg) { _messages.push(msg); }
 
 private:
 
-    std::queue<SGSoundSample *> _messages;
+    std::queue< SGSharedPtr<SGSoundSample> > _messages;
 
-    bool last_pause;
+    bool last_enabled;
     double last_volume;
 
-    SGPropertyNode_ptr _pause;
+    SGPropertyNode_ptr _enabled;
     SGPropertyNode_ptr _volume;
 };