diff --git a/windows/winmme/JackWinMMEInputPort.cpp b/windows/winmme/JackWinMMEInputPort.cpp index 856375ff..2c0b43b5 100644 --- a/windows/winmme/JackWinMMEInputPort.cpp +++ b/windows/winmme/JackWinMMEInputPort.cpp @@ -64,11 +64,8 @@ JackWinMMEInputPort::JackWinMMEInputPort(const char *alias_name, goto delete_sysex_buffer; } sysex_header.dwBufferLength = max_bytes; - sysex_header.dwBytesRecorded = 0; sysex_header.dwFlags = 0; - sysex_header.dwUser = 0; sysex_header.lpData = (LPSTR)(((LPBYTE) &sysex_header) + sizeof(MIDIHDR)); - sysex_header.lpNext = 0; result = midiInPrepareHeader(handle, &sysex_header, sizeof(MIDIHDR)); if (result != MMSYSERR_NOERROR) { GetInErrorString(result, error_message); @@ -104,7 +101,7 @@ JackWinMMEInputPort::JackWinMMEInputPort(const char *alias_name, result = midiInUnprepareHeader(handle, &sysex_header, sizeof(MIDIHDR)); if (result != MMSYSERR_NOERROR) { WriteInError("JackWinMMEInputPort [constructor]", - "midiInUnprepareHeader", result); + "midiInUnprepareHeader", result); } close_handle: result = midiInClose(handle); diff --git a/windows/winmme/JackWinMMEOutputPort.cpp b/windows/winmme/JackWinMMEOutputPort.cpp index 9a6247a5..dc1f8a70 100644 --- a/windows/winmme/JackWinMMEOutputPort.cpp +++ b/windows/winmme/JackWinMMEOutputPort.cpp @@ -184,11 +184,8 @@ JackWinMMEOutputPort::Execute() } MIDIHDR header; header.dwBufferLength = size; - header.dwBytesRecorded = size; header.dwFlags = 0; - header.dwOffset = 0; - header.dwUser = 0; - header.lpData = (LPSTR)data; + header.lpData = (LPSTR) data; result = midiOutPrepareHeader(handle, &header, sizeof(MIDIHDR)); if (result != MMSYSERR_NOERROR) { WriteOutError("JackWinMMEOutputPort::Execute", @@ -215,7 +212,6 @@ JackWinMMEOutputPort::Execute() "midiOutUnprepareHeader", result); break; } - } return false; } @@ -236,7 +232,7 @@ JackWinMMEOutputPort::HandleMessage(UINT message, DWORD_PTR param1, jack_info("JackWinMMEOutputPort::HandleMessage - MIDI device opened."); break; case MOM_POSITIONCB: - LPMIDIHDR header = (LPMIDIHDR) param2; + LPMIDIHDR header = (LPMIDIHDR) param1; jack_info("JackWinMMEOutputPort::HandleMessage - %d bytes out of %d " "bytes of the current sysex message have been sent.", header->dwOffset, header->dwBytesRecorded);