]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/fg_fx.hxx
Make FGAircraftModel behave like a standarrd subsystem.
[flightgear.git] / src / Sound / fg_fx.hxx
index 76d38915f6b09ccd584145e2287a409928da6e49..26c802f34a8f56953b26f5e5b7bbf0e488ea9c7a 100644 (file)
 
 #include <simgear/compiler.h>
 
-#include <queue>
 #include <vector>
 
 #include <simgear/structure/subsystem_mgr.hxx>
 #include <simgear/sound/sample_group.hxx>
-#include <simgear/math/SGMath.hxx>
 
 class SGXmlSound;
 
@@ -39,17 +37,11 @@ class SGXmlSound;
  * Generator for FlightGear sound effects.
  *
  * This module uses a FGSampleGroup class to generate sound effects based
- * on current flight conditions.  The sound manager must be initialized
+ * on current flight conditions. The sound manager must be initialized
  * before this object is.
  *
- * Note: this module supports two separate sound mechanisms concurrently.
- *
- * 1. This module will load and play a set of sound effects defined in an
+ *    This module will load and play a set of sound effects defined in an
  *    xml file and tie them to various property states.
- * 2. This modules also 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.
  */
 class FGFX : public SGSampleGroup
 {
@@ -63,28 +55,17 @@ public:
     virtual void reinit ();
     virtual void update (double dt);
 
-    /**
-     * add a sound sample to the message queue which is played sequentially
-     * in order.
-     */
-    void play_message( SGSoundSample *_sample );
-    void play_message( const std::string& path, const std::string& fname, double volume );
-
 private:
 
-    void update_pos_and_orientation(double dt);
-
-    SGVec3d last_visitor_pos;
-    SGVec3d last_model_pos;
-
+    SGSharedPtr<SGSampleGroup> _avionics;
     std::vector<SGXmlSound *> _sound;
-    std::queue<SGSoundSample *> _samplequeue;
-
-    bool last_pause;
-    double last_volume;
 
-    SGPropertyNode_ptr _pause;
+    SGPropertyNode_ptr _enabled;
     SGPropertyNode_ptr _volume;
+    SGPropertyNode_ptr _avionics_enabled;
+    SGPropertyNode_ptr _avionics_volume;
+    SGPropertyNode_ptr _avionics_external;
+    SGPropertyNode_ptr _internal;
 };