mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-13 15:40:57 +00:00
SCI: Moved handling of special reverb value 127 outside of the MIDI driver
svn-id: r54459
This commit is contained in:
parent
c3cb4c92a8
commit
9493b9add5
@ -378,10 +378,10 @@ int MidiPlayer_Midi::getVolume() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MidiPlayer_Midi::setReverb(byte reverb) {
|
void MidiPlayer_Midi::setReverb(byte reverb) {
|
||||||
assert(reverb < kReverbConfigNr || reverb == 127);
|
assert(reverb < kReverbConfigNr);
|
||||||
_reverb = reverb;
|
_reverb = reverb;
|
||||||
|
|
||||||
if (_hasReverb && _reverb != 127) // 127: SCI invalid, don't send to sound card
|
if (_hasReverb)
|
||||||
sendMt32SysEx(0x100001, _reverbConfig[_reverb], 3, true);
|
sendMt32SysEx(0x100001, _reverbConfig[_reverb], 3, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -501,7 +501,8 @@ void MidiParser_SCI::parseNextEvent(EventInfo &info) {
|
|||||||
// Also, sci/sound/iterator/iterator.cpp, function BaseSongIterator::parseMidiCommand()
|
// Also, sci/sound/iterator/iterator.cpp, function BaseSongIterator::parseMidiCommand()
|
||||||
switch (info.basic.param1) {
|
switch (info.basic.param1) {
|
||||||
case kSetReverb:
|
case kSetReverb:
|
||||||
((MidiPlayer *)_driver)->setReverb(info.basic.param2);
|
if (info.basic.param2 != 127) // 127: SCI invalid, ignore
|
||||||
|
((MidiPlayer *)_driver)->setReverb(info.basic.param2);
|
||||||
break;
|
break;
|
||||||
case kMidiHold:
|
case kMidiHold:
|
||||||
// Check if the hold ID marker is the same as the hold ID
|
// Check if the hold ID marker is the same as the hold ID
|
||||||
|
@ -227,7 +227,12 @@ MusicEntry *SciMusic::getActiveSci0MusicSlot() {
|
|||||||
|
|
||||||
void SciMusic::setReverb(byte reverb) {
|
void SciMusic::setReverb(byte reverb) {
|
||||||
Common::StackLock lock(_mutex);
|
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() {
|
byte SciMusic::getReverb() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user