[Scummvm-cvs-logs] SF.net SVN: scummvm: [31468] scummvm/trunk/engines/kyra/sound.cpp

lordhoto at users.sourceforge.net lordhoto at users.sourceforge.net
Thu Apr 10 21:02:18 CEST 2008


Revision: 31468
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31468&view=rev
Author:   lordhoto
Date:     2008-04-10 12:02:17 -0700 (Thu, 10 Apr 2008)

Log Message:
-----------
Small fix related to all notes off event.

Modified Paths:
--------------
    scummvm/trunk/engines/kyra/sound.cpp

Modified: scummvm/trunk/engines/kyra/sound.cpp
===================================================================
--- scummvm/trunk/engines/kyra/sound.cpp	2008-04-10 19:00:44 UTC (rev 31467)
+++ scummvm/trunk/engines/kyra/sound.cpp	2008-04-10 19:02:17 UTC (rev 31468)
@@ -259,7 +259,7 @@
 		return;
 	}
 
-	const uint8 volume = /*_eventFromMusic ? */_musicVolume/* : _sfxVolume*/;
+	const int volume = /*_eventFromMusic ? */_musicVolume/* : _sfxVolume*/;
 
 	uint8 channel = (byte)(b & 0x0F);
 	if (((b & 0xFFF0) == 0x6FB0 || (b & 0xFFF0) == 0x6EB0) && channel != 9) {
@@ -280,11 +280,11 @@
 		vol = vol * volume / 255;
 		b = (b & 0xFF00FFFF) | (vol << 16);
 	} else if ((b & 0xF0) == 0xC0 && !_nativeMT32 && !_useC55) {
-		b = (b & 0xFFFF00FF) | MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8;
+		b = (b & 0xFFFF00FF) | (MidiDriver::_mt32ToGm[(b >> 8) & 0xFF] << 8);
 	} else if ((b & 0xFFF0) == 0x007BB0) {
 		//Only respond to All Notes Off if this channel
 		//has currently been allocated
-		if (!_channel[channel])
+		if (!_channel[_virChannel[channel]])
 			return;
 	}
 


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list