aboutsummaryrefslogtreecommitdiff
path: root/sound/mixer.h
diff options
context:
space:
mode:
authorMax Horn2005-03-12 20:26:49 +0000
committerMax Horn2005-03-12 20:26:49 +0000
commit0e784d41d749934f89298990de92bee02e85ef67 (patch)
tree29fa83175378f65dd23c6f134855d7112a73ffef /sound/mixer.h
parent7cd2cb2b1700b85d48aed8898b08b49b9b46ebf8 (diff)
downloadscummvm-rg350-0e784d41d749934f89298990de92bee02e85ef67.tar.gz
scummvm-rg350-0e784d41d749934f89298990de92bee02e85ef67.tar.bz2
scummvm-rg350-0e784d41d749934f89298990de92bee02e85ef67.zip
Simplified SoundHandle implementation
svn-id: r17107
Diffstat (limited to 'sound/mixer.h')
-rw-r--r--sound/mixer.h17
1 files changed, 3 insertions, 14 deletions
diff --git a/sound/mixer.h b/sound/mixer.h
index 8121cee08c..31ed62181a 100644
--- a/sound/mixer.h
+++ b/sound/mixer.h
@@ -33,17 +33,7 @@ class Channel;
class File;
class OSystem;
-class SoundHandle {
- 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; }
- bool isActive() const { return val > 0; }
-public:
- SoundHandle() { resetIndex(); }
-};
+typedef uint32 SoundHandle;
class SoundMixer {
public:
@@ -99,6 +89,7 @@ private:
bool _paused;
+ uint32 _handleSeed;
Channel *_channels[NUM_CHANNELS];
bool _mixerReady;
@@ -212,9 +203,7 @@ public:
* @param handle the sound to query
* @return true if the sound is active
*/
- bool isSoundHandleActive(SoundHandle handle) {
- return handle.isActive();
- }
+ bool isSoundHandleActive(SoundHandle handle);
/**
* Check if the mixer is paused (using pauseAll).