]> git.mxchange.org Git - flightgear.git/blobdiff - src/Sound/soundmgr.hxx
Bernie Bright:
[flightgear.git] / src / Sound / soundmgr.hxx
index d47e9730a1f292d2a2c25de9a5e3ee5c857e76dc..fbab39fc469ad74194eb000ee7a0d497c8173c5e 100644 (file)
@@ -57,7 +57,7 @@ private:
     slEnvelope *volume_envelope;
     double pitch;
     double volume;
-    int clients;
+    int requests;
 
 public:
 
@@ -65,18 +65,13 @@ public:
     FGSimpleSound( unsigned char *buffer, int len );
     ~FGSimpleSound();
 
-    void play_once( slScheduler *sched );
-    void play_looped( slScheduler *sched );
+    void play( slScheduler *sched, bool looped );
+    void stop( slScheduler *sched, bool quick = true );
 
-    inline void play( slScheduler *sched, bool looped ) {
-       if (looped) play_looped( sched );
-       else play_once( sched );
-    }
-    inline void stop( slScheduler *sched ) {
-        sched->stopSample( sample );
-    }
+    inline void play_once( slScheduler *sched ) { play( sched, false); }
+    inline void play_looped( slScheduler *sched ) { play( sched, true); }
     inline bool is_playing( ) {
-       return (sample->getPlayCount() > 0 );
+        return ( sample->getPlayCount() > 0 );
     }
 
     inline double get_pitch() const { return pitch; }
@@ -153,6 +148,18 @@ public:
     void update(int dt);
 
 
+    /**
+     * Pause all sounds.
+     */
+    void pause ();
+
+
+    /**
+     * Resume all sounds.
+     */
+    void resume ();
+
+
     // is audio working?
     inline bool is_working() const { return !audio_sched->notWorking(); }