mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-10 23:01:59 +00:00
- Fixed: Any MIDI ticks that contain only events that are interpreted by
the MIDI parser and not passed on to the MIDI device would mess up timing for future events. SVN r945 (trunk)
This commit is contained in:
parent
ab5c981b10
commit
0bb92662d3
2 changed files with 17 additions and 16 deletions
|
@ -1,4 +1,7 @@
|
|||
April 26, 2008
|
||||
- Fixed: Any MIDI ticks that contain only events that are interpreted by
|
||||
the MIDI parser and not passed on to the MIDI device would mess up timing
|
||||
for future events.
|
||||
- Changed EMIDI controller 110-113 handling to more accurately match the
|
||||
EMIDI specs: Track designations and exclusions should be ignored past
|
||||
the initial beat, and EMIDI program change and volume events should be
|
||||
|
|
|
@ -456,12 +456,13 @@ DWORD *MIDISong2::SendCommand (DWORD *events, TrackInfo *track, DWORD delay)
|
|||
if (data2 == 127)
|
||||
{
|
||||
track->Designation = ~0;
|
||||
track->Designated = true;
|
||||
}
|
||||
else if (data2 <= 9)
|
||||
{
|
||||
track->Designation |= 1 << data2;
|
||||
track->Designated = true;
|
||||
}
|
||||
track->Designated = true;
|
||||
event = MIDI_META;
|
||||
}
|
||||
break;
|
||||
|
@ -503,7 +504,7 @@ DWORD *MIDISong2::SendCommand (DWORD *events, TrackInfo *track, DWORD delay)
|
|||
track->LoopDelay = 0;
|
||||
track->LoopCount = data2;
|
||||
track->LoopFinished = track->Finished;
|
||||
event = 0xFF;
|
||||
event = MIDI_META;
|
||||
break;
|
||||
|
||||
case 117: // EMIDI Loop End
|
||||
|
@ -524,7 +525,7 @@ DWORD *MIDISong2::SendCommand (DWORD *events, TrackInfo *track, DWORD delay)
|
|||
track->Finished = track->LoopFinished;
|
||||
}
|
||||
}
|
||||
event = 0xFF;
|
||||
event = MIDI_META;
|
||||
break;
|
||||
|
||||
case 118: // EMIDI Global Loop Begin
|
||||
|
@ -535,7 +536,7 @@ DWORD *MIDISong2::SendCommand (DWORD *events, TrackInfo *track, DWORD delay)
|
|||
Tracks[i].LoopCount = data2;
|
||||
Tracks[i].LoopFinished = Tracks[i].Finished;
|
||||
}
|
||||
event = 0xFF;
|
||||
event = MIDI_META;
|
||||
break;
|
||||
|
||||
case 119: // EMIDI Global Loop End
|
||||
|
@ -566,20 +567,17 @@ DWORD *MIDISong2::SendCommand (DWORD *events, TrackInfo *track, DWORD delay)
|
|||
break;
|
||||
}
|
||||
}
|
||||
if (event != MIDI_META)
|
||||
events[0] = delay;
|
||||
events[1] = 0;
|
||||
if (event != MIDI_META && (!track->Designated || (track->Designation & DesignationMask)))
|
||||
{
|
||||
events[0] = delay;
|
||||
events[1] = 0;
|
||||
if (!track->Designated || (track->Designation & DesignationMask))
|
||||
{
|
||||
events[2] = event | (data1<<8) | (data2<<16);
|
||||
}
|
||||
else
|
||||
{
|
||||
events[2] = MEVT_NOP;
|
||||
}
|
||||
events += 3;
|
||||
events[2] = event | (data1<<8) | (data2<<16);
|
||||
}
|
||||
else
|
||||
{
|
||||
events[2] = MEVT_NOP;
|
||||
}
|
||||
events += 3;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue