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.

svn-id: r9635
This commit is contained in:
Jamieson Christian 2003-08-11 04:33:17 +00:00
parent 50ce07c391
commit 45f3db95fd

View File

@ -108,8 +108,9 @@ void MidiPlayer::send (uint32 b) {
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);