]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/soundmgr.hxx
Added static port system and a new altimeter model connected to it.
[flightgear.git] / src / Sound / soundmgr.hxx
index 8a54ee457822a20eb3d7e7df73160f6e237190e9..3e89b225bbc63a3ad70b5359580caa6602436946 100644 (file)
@@ -57,7 +57,6 @@ private:
     slEnvelope *volume_envelope;
     double pitch;
     double volume;
-    int requests;
 
 public:
 
@@ -70,7 +69,9 @@ public:
 
     inline void play_once( slScheduler *sched ) { play( sched, false); }
     inline void play_looped( slScheduler *sched ) { play( sched, true); }
-    inline bool is_playing( ) { return (requests > 0 ); }
+    inline bool is_playing( ) {
+        return ( sample->getPlayCount() > 0 );
+    }
 
     inline double get_pitch() const { return pitch; }
     inline void set_pitch( double p ) {
@@ -113,7 +114,6 @@ class FGSoundMgr : public FGSubsystem
     sound_map sounds;
     sample_map samples;
 
-    SGTimeStamp last;
     double safety;
 
 public:
@@ -143,7 +143,19 @@ public:
     /**
      * Run the audio scheduler.
      */
-    void update(int dt);
+    void update(double dt);
+
+
+    /**
+     * Pause all sounds.
+     */
+    void pause ();
+
+
+    /**
+     * Resume all sounds.
+     */
+    void resume ();
 
 
     // is audio working?