slEnvelope *volume_envelope;
double pitch;
double volume;
- int requests;
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 ) {
sound_map sounds;
sample_map samples;
- SGTimeStamp last;
double safety;
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?