diff options
author | Max Horn | 2003-06-22 01:55:53 +0000 |
---|---|---|
committer | Max Horn | 2003-06-22 01:55:53 +0000 |
commit | 4ad5a183ce4c37ede13e88f3bc0d5b0c0c687026 (patch) | |
tree | ecd3d72be68b996ab004d22ff775dac259c395ac /sound/mixer.h | |
parent | 573a1e3e9907d228d4826cfb26a99d27ca15676d (diff) | |
download | scummvm-rg350-4ad5a183ce4c37ede13e88f3bc0d5b0c0c687026.tar.gz scummvm-rg350-4ad5a183ce4c37ede13e88f3bc0d5b0c0c687026.tar.bz2 scummvm-rg350-4ad5a183ce4c37ede13e88f3bc0d5b0c0c687026.zip |
renamed SoundMixer::hasActiveChannel->hasActiveSFXChannel, and fixed the regression in it caused by removing _beginSlots (I hope); added isActiveChannel method used by scumm/sound.cpp (this allowed me to move the Channel class from mixer.h into mixer.cpp); replaced Channel::soundFinished method by isActive
svn-id: r8597
Diffstat (limited to 'sound/mixer.h')
-rw-r--r-- | sound/mixer.h | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/sound/mixer.h b/sound/mixer.h index 06f22e38fc..bced868538 100644 --- a/sound/mixer.h +++ b/sound/mixer.h @@ -41,26 +41,6 @@ typedef uint32 PlayingSoundHandle; class Channel; class File; -class SoundMixer; - -// TODO: class Channel should really be declared non-public, inside mixer.cpp -// However, right now Sound::updateMP3CD directly calls soundFinished. That -// should be changed, by adding proper API abstraction to SoundMixer for -// MP3/Vorbis "CD" playback. -class Channel { -protected: - SoundMixer *_mixer; -public: - bool _toBeDestroyed; - int _id; - Channel() : _mixer(0), _toBeDestroyed(false), _id(-1) {} - virtual ~Channel() {} - virtual void mix(int16 *data, uint len) = 0; - void destroy() { - _toBeDestroyed = true; - } - virtual bool soundFinished(); -}; class SoundMixer { public: @@ -133,8 +113,11 @@ public: /** append to existing sound */ int append(int index, void * sound, uint32 size); - /** is any channel active? */ - bool hasActiveChannel(); + /** Check whether any SFX channel is active.*/ + bool hasActiveSFXChannel(); + + /** Check whether the specified channel si active. */ + bool isActiveChannel(int index); /** bind to the OSystem object => mixer will be * invoked automatically when samples need |