]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/fg_sound.hxx
Make sure that all elapsed time gets passed to update when a subsystem
[flightgear.git] / src / Sound / fg_sound.hxx
index f6c21b80bcb9d58ffaef2308fab59312f4e4be3c..4d4824bb4ef8ee896aa1a4205a1770a0c5a85875 100644 (file)
@@ -33,6 +33,9 @@
 
 #include "soundmgr.hxx"
 
+static const double MAX_TRANSIT_TIME = 0.1;    // 100 ms.
+
+
 /**
  * Class for handling one sound event.
  *
@@ -56,7 +59,6 @@ protected:
   enum { ONCE=0, LOOPED, IN_TRANSIT };
   enum { LEVEL=0, INVERTED, FLIPFLOP };
 
-
   // Sound properties
   typedef struct {
         SGPropertyNode * prop;
@@ -83,6 +85,8 @@ private:
   double _prev_value;
   double _dt_play;
   double _dt_stop;
+  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;