[Scummvm-git-logs] scummvm master -> 6006cfee3e3d38dc2d55a8634073d33f27a550af
sev-
sev at scummvm.org
Mon Apr 20 16:55:14 UTC 2020
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
6006cfee3e SCI: MIDI - don't send "controller 75" to physical device
Commit: 6006cfee3e3d38dc2d55a8634073d33f27a550af
https://github.com/scummvm/scummvm/commit/6006cfee3e3d38dc2d55a8634073d33f27a550af
Author: Zvika Haramaty (haramaty.zvika at gmail.com)
Date: 2020-04-20T18:55:09+02:00
Commit Message:
SCI: MIDI - don't send "controller 75" to physical device
Sierra used MIDI controller 75 for internal purposes, and it shouldn't
be issued to the real MIDI device.
This fixes issue #11409
Changed paths:
engines/sci/sound/drivers/midi.cpp
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp
index 1aa0b0f8b2..0f4c5838a4 100644
--- a/engines/sci/sound/drivers/midi.cpp
+++ b/engines/sci/sound/drivers/midi.cpp
@@ -308,6 +308,7 @@ void MidiPlayer_Midi::noteOn(int channel, int note, int velocity) {
void MidiPlayer_Midi::controlChange(int channel, int control, int value) {
assert(channel <= 15);
+ bool standard_midi_controller = true;
switch (control) {
case 0x07:
@@ -340,6 +341,8 @@ void MidiPlayer_Midi::controlChange(int channel, int control, int value) {
_channels[channel].hold = value;
break;
case 0x4b: // voice mapping
+ // this is an internal Sierra command, and shouldn't be sent to the real MIDI driver - fixing #11409
+ standard_midi_controller = false;
break;
case 0x4e: // velocity
break;
@@ -349,7 +352,8 @@ void MidiPlayer_Midi::controlChange(int channel, int control, int value) {
break;
}
- _driver->send(0xb0 | channel, control, value);
+ if (standard_midi_controller)
+ _driver->send(0xb0 | channel, control, value);
}
void MidiPlayer_Midi::setPatch(int channel, int patch) {
More information about the Scummvm-git-logs
mailing list