]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/xmlsound.hxx
Reset: allow re-init of Nasal Ghosts.
[simgear.git] / simgear / sound / xmlsound.hxx
index 141f5eef299bf1cbb7d98ea5735d7b59aee2d8e9..34761df0e4733f3546073ecd1988283556527f5c 100644 (file)
 #ifndef _SG_SOUND_HXX
 #define _SG_SOUND_HXX 1
 
-#ifndef __cplusplus
-# error This library requires C++
-#endif
 
 #include <vector>
-
+#include <string>
+     
 #include <simgear/compiler.h>
-#include <simgear/props/condition.hxx>
 
-#include "sample_group.hxx"
-#include "sample_openal.hxx"
+#include <simgear/props/propsfwd.hxx>
+#include <simgear/structure/SGSharedPtr.hxx>
+
+// forward decls
+class SGSampleGroup;
+class SGSoundSample;
+class SGCondition;
+class SGPath;
 
 static const double MAX_TRANSIT_TIME = 0.1;    // 100 ms.
 
@@ -104,7 +107,7 @@ public:
    * @param path The path where the audio files remain.
    */
   virtual void init (SGPropertyNode *, SGPropertyNode *, SGSampleGroup *,
-                     SGSampleGroup *, const string &);
+                     SGSampleGroup *, const SGPath& currentDir);
 
   /**
    * Check whether an event has happened and if action has to be taken.
@@ -143,18 +146,18 @@ private:
   SGPropertyNode_ptr _property;
 
   bool _active;
-  string _name;
+  std::string _name;
   int _mode;
   double _prev_value;
   double _dt_play;
   double _dt_stop;
   double _delay;        // time after which the sound should be started (default: 0)
-  double _stopping;    // time after the sound should have stopped.
-                       // This is useful for lost packets in in-transit mode.
+  double _stopping;     // time after the sound should have stopped.
+                        // This is useful for lost packets in in-transit mode.
+  bool _initialized;
 
   std::vector<_snd_prop> _volume;
   std::vector<_snd_prop> _pitch;
-
 };
 
 #endif // _SG_SOUND_HXX