[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.163,1.164 mixer.h,1.78,1.79
Travis Howell
kirben at users.sourceforge.net
Sun Sep 19 05:23:07 CEST 2004
Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27044/sound
Modified Files:
mixer.cpp mixer.h
Log Message:
Actually check if a sound is active, if the sound is outside music engine.
Add some more HE differences
Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.163
retrieving revision 1.164
diff -u -d -r1.163 -r1.164
--- mixer.cpp 18 Sep 2004 14:31:36 -0000 1.163
+++ mixer.cpp 19 Sep 2004 12:22:47 -0000 1.164
@@ -463,6 +463,13 @@
_channels[index]->pause(paused);
}
+bool SoundMixer::isSoundIDActive(int id) {
+ for (int i = 0; i != NUM_CHANNELS; i++)
+ if (_channels[i] && _channels[i]->getId() == id)
+ return true;
+ return false;
+}
+
bool SoundMixer::hasActiveSFXChannel() {
// FIXME/TODO: We need to distinguish between SFX and music channels
Common::StackLock lock(_mutex);
Index: mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.h,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -d -r1.78 -r1.79
--- mixer.h 4 Sep 2004 13:13:23 -0000 1.78
+++ mixer.h 19 Sep 2004 12:22:47 -0000 1.79
@@ -145,6 +145,9 @@
/** pause/unpause all channels */
void pauseAll(bool paused);
+ /** check if sound ID is active */
+ bool isSoundIDActive(int id);
+
/** check if mixer is paused */
bool isPaused();
More information about the Scummvm-git-logs
mailing list