]> git.mxchange.org Git - simgear.git/blobdiff - simgear/sound/xmlsound.hxx
MINGW patch by Csaba Halasz
[simgear.git] / simgear / sound / xmlsound.hxx
index e290b3939d20332d0d08c74abde54e3462579055..22dc5c2eeedf3fd877045c3b2da6369145603e7b 100644 (file)
@@ -16,7 +16,7 @@
 //
 // You should have received a copy of the GNU General Public License
 // along with this program; if not, write to the Free Software
-// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 //
 // $Id$
 
@@ -33,6 +33,8 @@
 # error This library requires C++
 #endif
 
+#include <vector>
+
 #include <simgear/compiler.h>
 #include <simgear/props/condition.hxx>
 
@@ -76,6 +78,7 @@ public:
    *    <path/> The relative path to the audio file.
    *    <property/> Take action if this property becomes true.
    *    <condition/> Take action if this condition becomes true.
+   *    <delay-sec/> Time after which the sound should be played.
    *    <volume> or <pitch> Define volume or pitch settings.
    *     <property/> Take the value of this property as a refference for the
    *                 result.
@@ -120,7 +123,7 @@ protected:
 
   // SGXmlSound properties
   typedef struct {
-        SGPropertyNode * prop;
+        SGPropertyNode_ptr prop;
         double (*fn)(double);
         double *intern;
         double factor;
@@ -133,10 +136,10 @@ protected:
 private:
 
   SGSoundMgr * _mgr;
-  SGSoundSample * _sample;
+  SGSharedPtr<SGSoundSample> _sample;
 
   SGCondition * _condition;
-  SGPropertyNode * _property;
+  SGPropertyNode_ptr _property;
 
   bool _active;
   string _name;
@@ -144,11 +147,12 @@ private:
   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 usefull for lost packets in in-trasit mode.
 
-  vector<_snd_prop> _volume;
-  vector<_snd_prop> _pitch;
+  std::vector<_snd_prop> _volume;
+  std::vector<_snd_prop> _pitch;
 
 };