[Bug 48781] New: midiOutShortMsg sends more than 2 bytes for Program Change

WineHQ Bugzilla wine-bugs at winehq.org
Fri Mar 20 13:52:18 CDT 2020


https://bugs.winehq.org/show_bug.cgi?id=48781

            Bug ID: 48781
           Summary: midiOutShortMsg sends more than 2 bytes for Program
                    Change
           Product: Wine
           Version: 5.0-rc6
          Hardware: x86
                OS: Linux
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: winmm&mci
          Assignee: wine-bugs at winehq.org
          Reporter: reinhold.hoffmann at hotmail.com
      Distribution: ---

According to the Windows multimedia spec of midiOutShortMsg the second pair of
MIDI data bytes are optional, depending on the MIDI status byte. For the MIDI
event Program Change there are no optional data bytes. But midiOutShortMsg for
Program Change sends those optional bytes, too. This results that some modern
keyboards accepts the second byte as a further Program Change which is 0
meaning piano for bank 0. The consequence is that every midi file played by
such an external MIDI device always sounds as piano. According to the Windows
spec "This function - midiOutShortMsg - is used to send any MIDI message except
for system-exclusive or stream messages." - which means for Program Change as
well resulting in that behaviour.

As a workaround midiOutLongMsg was used for Program Change with length = 2.
This avoids sending additional invalid bytes. midiOutShortMsg is very broadly
used according to the Windows spec for Program Change events and should be able
to handle Program Change correctly.

-- 
Do not reply to this email, post in Bugzilla using the
above URL to reply.
You are receiving this mail because:
You are watching all bug changes.



More information about the wine-bugs mailing list