From aeb5377821df5914d2d279c43dedf57190f4e6bb Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Wed, 5 Oct 2016 16:45:12 +0200 Subject: [PATCH] - do not generate SYSEX events when playing MIDIs through FMod, because there has been a report that it doesn't work correctly. --- src/sound/music_hmi_midiout.cpp | 2 +- src/sound/music_smf_midiout.cpp | 2 +- src/sound/music_xmi_midiout.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/sound/music_hmi_midiout.cpp b/src/sound/music_hmi_midiout.cpp index 21790784c..7d9d36926 100644 --- a/src/sound/music_hmi_midiout.cpp +++ b/src/sound/music_hmi_midiout.cpp @@ -657,7 +657,7 @@ DWORD *HMISong::SendCommand (DWORD *events, TrackInfo *track, DWORD delay, ptrdi if (event == MIDI_SYSEX || event == MIDI_SYSEXEND) { len = ReadVarLen(track); - if (len >= (MAX_EVENTS-1)*3*4) + if (len >= (MAX_EVENTS-1)*3*4 || DeviceType == MDEV_SNDSYS) { // This message will never fit. Throw it away. track->TrackP += len; } diff --git a/src/sound/music_smf_midiout.cpp b/src/sound/music_smf_midiout.cpp index ffcbc9f62..a045998a8 100644 --- a/src/sound/music_smf_midiout.cpp +++ b/src/sound/music_smf_midiout.cpp @@ -598,7 +598,7 @@ DWORD *MIDISong2::SendCommand (DWORD *events, TrackInfo *track, DWORD delay, ptr if (event == MIDI_SYSEX || event == MIDI_SYSEXEND) { len = track->ReadVarLen(); - if (len >= (MAX_EVENTS-1)*3*4) + if (len >= (MAX_EVENTS-1)*3*4 || DeviceType == MDEV_SNDSYS) { // This message will never fit. Throw it away. track->TrackP += len; } diff --git a/src/sound/music_xmi_midiout.cpp b/src/sound/music_xmi_midiout.cpp index a9cbcd2c6..b56e8f6f8 100644 --- a/src/sound/music_xmi_midiout.cpp +++ b/src/sound/music_xmi_midiout.cpp @@ -528,7 +528,7 @@ DWORD *XMISong::SendCommand (DWORD *events, EventSource due, DWORD delay, ptrdif if (event == MIDI_SYSEX || event == MIDI_SYSEXEND) { len = track->ReadVarLen(); - if (len >= (MAX_EVENTS-1)*3*4) + if (len >= (MAX_EVENTS-1)*3*4 || DeviceType == MDEV_SNDSYS) { // This message will never fit. Throw it away. track->EventP += len; }