diff options
author | Filippos Karapetis | 2010-11-24 14:51:29 +0000 |
---|---|---|
committer | Filippos Karapetis | 2010-11-24 14:51:29 +0000 |
commit | 9493b9add55e1254ad56b4ffdf8b076b22c08546 (patch) | |
tree | d4c696068d9647014f2bebb3fbf264b3a9d3cb86 /engines | |
parent | c3cb4c92a8224d1e892871bd8ab26b3d0cf0e6a9 (diff) | |
download | scummvm-rg350-9493b9add55e1254ad56b4ffdf8b076b22c08546.tar.gz scummvm-rg350-9493b9add55e1254ad56b4ffdf8b076b22c08546.tar.bz2 scummvm-rg350-9493b9add55e1254ad56b4ffdf8b076b22c08546.zip |
SCI: Moved handling of special reverb value 127 outside of the MIDI driver
svn-id: r54459
Diffstat (limited to 'engines')
-rw-r--r-- | engines/sci/sound/drivers/midi.cpp | 4 | ||||
-rw-r--r-- | engines/sci/sound/midiparser_sci.cpp | 3 | ||||
-rw-r--r-- | engines/sci/sound/music.cpp | 7 |
3 files changed, 10 insertions, 4 deletions
diff --git a/engines/sci/sound/drivers/midi.cpp b/engines/sci/sound/drivers/midi.cpp index 70e1cf2133..ccb1c87d02 100644 --- a/engines/sci/sound/drivers/midi.cpp +++ b/engines/sci/sound/drivers/midi.cpp @@ -378,10 +378,10 @@ int MidiPlayer_Midi::getVolume() { } void MidiPlayer_Midi::setReverb(byte reverb) { - assert(reverb < kReverbConfigNr || reverb == 127); + assert(reverb < kReverbConfigNr); _reverb = reverb; - if (_hasReverb && _reverb != 127) // 127: SCI invalid, don't send to sound card + if (_hasReverb) sendMt32SysEx(0x100001, _reverbConfig[_reverb], 3, true); } diff --git a/engines/sci/sound/midiparser_sci.cpp b/engines/sci/sound/midiparser_sci.cpp index abd3894d9a..398917764c 100644 --- a/engines/sci/sound/midiparser_sci.cpp +++ b/engines/sci/sound/midiparser_sci.cpp @@ -501,7 +501,8 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) { // Also, sci/sound/iterator/iterator.cpp, function BaseSongIterator::parseMidiCommand() switch (info.basic.param1) { case kSetReverb: - ((MidiPlayer *)_driver)->setReverb(info.basic.param2); + if (info.basic.param2 != 127) // 127: SCI invalid, ignore + ((MidiPlayer *)_driver)->setReverb(info.basic.param2); break; case kMidiHold: // Check if the hold ID marker is the same as the hold ID diff --git a/engines/sci/sound/music.cpp b/engines/sci/sound/music.cpp index 010f161a7a..6628c175c6 100644 --- a/engines/sci/sound/music.cpp +++ b/engines/sci/sound/music.cpp @@ -227,7 +227,12 @@ MusicEntry *SciMusic::getActiveSci0MusicSlot() { void SciMusic::setReverb(byte reverb) { Common::StackLock lock(_mutex); - _pMidiDrv->setReverb(reverb); + if (reverb != 127) // 127: SCI invalid, ignore + _pMidiDrv->setReverb(reverb); + + // SSCI stored a separate reverb value per song + // We don't, currently, as the current functionality + // works without an additional variable } byte SciMusic::getReverb() { |