mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-28 06:53:40 +00:00
Fix CreateSMF's SysEx writing
- It was wrong before. It might still be wrong, but at least it doesn't look obviously wrong anymore.
This commit is contained in:
parent
545e2f7c69
commit
6d2e93254f
1 changed files with 8 additions and 2 deletions
|
@ -1196,9 +1196,15 @@ void MIDIStreamer::CreateSMF(TArray<BYTE> &file, int looplimit)
|
||||||
len--;
|
len--;
|
||||||
file.Push(MIDI_SYSEX);
|
file.Push(MIDI_SYSEX);
|
||||||
WriteVarLen(file, len);
|
WriteVarLen(file, len);
|
||||||
memcpy(&file[file.Reserve(len - 1)], bytes, len);
|
memcpy(&file[file.Reserve(len)], bytes + 1, len);
|
||||||
running_status = 255;
|
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
file.Push(MIDI_SYSEXEND);
|
||||||
|
WriteVarLen(file, len);
|
||||||
|
memcpy(&file[file.Reserve(len)], bytes, len);
|
||||||
|
}
|
||||||
|
running_status = 255;
|
||||||
}
|
}
|
||||||
else if (MEVT_EVENTTYPE(event[2]) == 0)
|
else if (MEVT_EVENTTYPE(event[2]) == 0)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue