From 4ad5a183ce4c37ede13e88f3bc0d5b0c0c687026 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Sun, 22 Jun 2003 01:55:53 +0000 Subject: 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 --- sound/mixer.h | 27 +++++---------------------- 1 file changed, 5 insertions(+), 22 deletions(-) (limited to 'sound/mixer.h') 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 -- cgit v1.2.3