aboutsummaryrefslogtreecommitdiff
path: root/sound/mixer.h
diff options
context:
space:
mode:
Diffstat (limited to 'sound/mixer.h')
-rw-r--r--sound/mixer.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/sound/mixer.h b/sound/mixer.h
index 3ed2cd798f..d1bd379408 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -35,12 +35,22 @@
#endif
-typedef uint32 PlayingSoundHandle;
-
class AudioInputStream;
class Channel;
class File;
+class PlayingSoundHandle {
+ friend class Channel;
+ friend class SoundMixer;
+ int val;
+ int getIndex() const { return val - 1; }
+ void setIndex(int i) { val = i + 1; }
+ void resetIndex() { val = 0; }
+public:
+ PlayingSoundHandle() { resetIndex(); }
+ bool isActive() const { return val > 0; }
+};
+
class SoundMixer {
public:
typedef void PremixProc (void *param, int16 *data, uint len);