mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-21 01:08:25 +00:00
Added what I hope is the proper fix for bug #1498785 ("LOOM: Unknown Roland
MIDI music events"). It would probably be safe to commit to the 0.11 branch, but I don't know for sure which games would be affected other than EGA Loom. svn-id: r30132
This commit is contained in:
parent
86aeae4a74
commit
46368eac5f
@ -69,9 +69,20 @@ void MidiParser_RO::parseNextEvent (EventInfo &info) {
|
||||
if (info.command() == 0xA) {
|
||||
++_lastMarkerCount;
|
||||
info.event = 0xF0;
|
||||
} else if (info.event == 0xF0) {
|
||||
} else if (info.command() == 0xF) {
|
||||
byte delay = *(_position._play_pos++);
|
||||
info.delta += delay;
|
||||
if (info.event != 0xF0) {
|
||||
// The event is usually 0xF0 but there are a
|
||||
// few cases in EGA Loom where it's 0xF1. I'm
|
||||
// speculating that this is for adding values
|
||||
// greater than 255 to info.delta. See bug
|
||||
// #1498785.
|
||||
//
|
||||
// The actual calculation is pure guesswork,
|
||||
// but the result sounds good enough to me.
|
||||
info.delta += 256;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user