[Scummvm-cvs-logs] CVS: scummvm/simon midi.cpp,1.55,1.56
Jamieson Christian
jamieson630 at users.sourceforge.net
Sun Aug 10 21:34:02 CEST 2003
Update of /cvsroot/scummvm/scummvm/simon
In directory sc8-pr-cvs1:/tmp/cvs-serv9812/scummvm/simon
Modified Files:
midi.cpp
Log Message:
Fix for Bug [777589] SIMON1: Sound volume strangeness
Fixed redundant, cumulative adjustments of _masterVolume
on the individual channel volumes. This fixes problems
with individual instruments changing volume by too much,
or dropping out altogether, when changing the master
music volume.
Index: midi.cpp
===================================================================
RCS file: /cvsroot/scummvm/scummvm/simon/midi.cpp,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- midi.cpp 8 Aug 2003 11:54:24 -0000 1.55
+++ midi.cpp 11 Aug 2003 04:33:17 -0000 1.56
@@ -108,8 +108,9 @@
if ((b & 0xFFF0) == 0x07B0) {
// Adjust volume changes by master volume.
- volume = (byte) ((b >> 16) & 0xFF) * _masterVolume / 255;
+ volume = (byte) ((b >> 16) & 0x7F);
_volumeTable [b & 0xF] = volume;
+ volume = volume * _masterVolume / 255;
b = (b & 0xFF00FFFF) | (volume << 16);
} else if ((b & 0xF0) == 0xC0 && _map_mt32_to_gm) {
b = (b & 0xFFFF00FF) | (mt32_to_gm [(b >> 8) & 0xFF] << 8);
More information about the Scummvm-git-logs
mailing list