From af15ac6f6aa693ee0dd1222ee892d63432661c8c Mon Sep 17 00:00:00 2001 From: Filippos Karapetis Date: Thu, 25 Nov 2010 22:23:14 +0000 Subject: SCI: Some reverb-related changes in the MIDI driver, based on a patch by waltervn svn-id: r54484 --- engines/sci/sound/drivers/midi.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'engines/sci') diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp index 2627f0728c..05d88e5436 100644 --- a/engines/sci/sound/drivers/midi.cpp +++ b/engines/sci/sound/drivers/midi.cpp @@ -385,10 +385,11 @@ int MidiPlayer_Midi::getVolume() { void MidiPlayer_Midi::setReverb(int8 reverb) { assert(reverb < kReverbConfigNr); - _reverb = reverb; + + if (_hasReverb && (_reverb != reverb)) + sendMt32SysEx(0x100001, _reverbConfig[reverb], 3, true); - if (_hasReverb) - sendMt32SysEx(0x100001, _reverbConfig[_reverb], 3, true); + _reverb = reverb; } void MidiPlayer_Midi::playSwitch(bool play) { @@ -477,7 +478,10 @@ void MidiPlayer_Midi::readMt32Patch(const byte *data, int size) { setMt32Volume(volume); // Reverb default only used in (roughly) SCI0/SCI01 - _reverb = str->readByte(); + byte reverb = str->readByte(); + if (_version <= SCI_VERSION_0_LATE) + setReverb(reverb); + _hasReverb = true; // Skip reverb SysEx message -- cgit v1.2.3