[Scummvm-cvs-logs] scummvm master -> 9ffec86b5d612067f3f8a0a0126a3000c22965ff

lordhoto lordhoto at gmail.com
Sun Apr 21 14:24:23 CEST 2013


This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
8d25c55891 KYRA: Fix MIDI fade-out behaviour
9ffec86b5d Merge pull request #324 from eriktorbjorn/kyra-midifade


Commit: 8d25c558910c1a2e14c32ace568121ab8c643b70
    https://github.com/scummvm/scummvm/commit/8d25c558910c1a2e14c32ace568121ab8c643b70
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2013-04-21T03:54:19-07:00

Commit Message:
KYRA: Fix MIDI fade-out behaviour

There are two ways that the music volume may be set:

The setSourceVolume() specifies the current music volume, as
ScummVM sees it. This is stored in _sources[].volume.

The MIDI data itself can trigger volume events. These are handled
by send(), which stores the volume - usually (always?) 100 - in
_sources[_curSource].controllers[]. The volume is then adjusted
by _sources[].volume.

When music is faded out, setSourceVolume() is called repeatedly
with progressively smaller values for the volume. What it should
do, then, is to make sure that the volume is set to what was
previously set to in send(), adjusted to the fading volume.

At least, that's how I understand it.

Changed paths:
    engines/kyra/sound_midi.cpp



diff --git a/engines/kyra/sound_midi.cpp b/engines/kyra/sound_midi.cpp
index b93b42f..fc6e92a 100644
--- a/engines/kyra/sound_midi.cpp
+++ b/engines/kyra/sound_midi.cpp
@@ -323,7 +323,7 @@ void MidiOutput::setSourceVolume(int source, int volume, bool apply) {
 		for (int i = 0; i < 16; ++i) {
 			// Controller 0 in the state table should always be '7' aka
 			// volume control
-			byte realVol = (_channels[i].controllers[0].value * volume) >> 8;
+			byte realVol = (_sources[source].controllers[i][0].value * volume) >> 8;
 			sendIntern(0xB0, i, 0x07, realVol);
 		}
 	}


Commit: 9ffec86b5d612067f3f8a0a0126a3000c22965ff
    https://github.com/scummvm/scummvm/commit/9ffec86b5d612067f3f8a0a0126a3000c22965ff
Author: Johannes Schickel (lordhoto at gmail.com)
Date: 2013-04-21T05:23:50-07:00

Commit Message:
Merge pull request #324 from eriktorbjorn/kyra-midifade

KYRA: Fix MIDI fade-out behaviour

Changed paths:
    engines/kyra/sound_midi.cpp









More information about the Scummvm-git-logs mailing list