[Scummvm-cvs-logs] CVS: scummvm/sound mixer.cpp,1.188,1.189 mixer.h,1.100,1.101

kirben kirben at users.sourceforge.net
Mon Apr 4 04:43:48 CEST 2005


Update of /cvsroot/scummvm/scummvm/sound
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8107/sound

Modified Files:
	mixer.cpp mixer.h 
Log Message:

Add 8 sound channel support for HE games
-Allows sound looping to work

Added support for WAVE format musuc used in later HE100 games.


Index: mixer.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.cpp,v
retrieving revision 1.188
retrieving revision 1.189
diff -u -d -r1.188 -r1.189
--- mixer.cpp	23 Mar 2005 16:41:44 -0000	1.188
+++ mixer.cpp	4 Apr 2005 11:43:24 -0000	1.189
@@ -367,6 +367,14 @@
 	return false;
 }
 
+int SoundMixer::getActiveChannelSoundID(SoundHandle handle) {
+	Common::StackLock lock(_mutex);
+	const int index = handle._val % NUM_CHANNELS;
+	if (_channels[index])
+		return _channels[index]->getId();
+	return 0;
+}
+
 bool SoundMixer::isSoundHandleActive(SoundHandle handle) {
 	Common::StackLock lock(_mutex);
 	const int index = handle._val % NUM_CHANNELS;

Index: mixer.h
===================================================================
RCS file: /cvsroot/scummvm/scummvm/sound/mixer.h,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- mixer.h	22 Mar 2005 18:29:00 -0000	1.100
+++ mixer.h	4 Apr 2005 11:43:25 -0000	1.101
@@ -205,9 +205,17 @@
 	bool isSoundIDActive(int id);
 
 	/**
+	 * Get the sound ID of handle sound
+	 *
+	 * @param handle sound to query
+	 * @return sound ID if active
+	 */
+	int getActiveChannelSoundID(SoundHandle handle);
+
+	/**
 	 * Check if a sound with the given hANDLE is active.
 	 *
-	 * @param handle the sound to query
+	 * @param handle sound to query
 	 * @return true if the sound is active
 	 */
 	bool isSoundHandleActive(SoundHandle handle);





More information about the Scummvm-git-logs mailing list