[Scummvm-cvs-logs] CVS: scummvm/simon midi.cpp,1.59,1.60

Jamieson Christian jamieson630 at users.sourceforge.net
Sun Oct 12 07:32:02 CEST 2003


Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv20923/scummvm/simon

Modified Files:
	midi.cpp 
Log Message:
Fix for Bug [821514] SIMON: No Adlib volume for percussion

Transmit volume with each percussion event. (Necessary
because music and SFX tracks may share the percussion
channel.) This is the same approach used in iMuse.

Index: midi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/midi.cpp,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- midi.cpp	3 Oct 2003 19:42:27 -0000	1.59
+++ midi.cpp	12 Oct 2003 14:31:21 -0000	1.60
@@ -124,8 +124,11 @@
 
 	if (!_current->channel[channel])
 		_current->channel[channel] = (channel == 9) ? _driver->getPercussionChannel() : _driver->allocateChannel();
-	if (_current->channel[channel])
+	if (_current->channel[channel]) {
+		if (channel == 9)
+			_current->channel[9]->volume (_current->volume[9] * _masterVolume / 255);
 		_current->channel[channel]->send(b);
+	}
 }
 
 void MidiPlayer::metaEvent (byte type, byte *data, uint16 length) {





More information about the Scummvm-git-logs mailing list