Browse Source

WinMME: Silly parameter reference fix for sysex progress callbacks. Removed a bit of unnecessary code.

tags/1.9.8
Devin Anderson 14 years ago
parent
commit
4fa397f2ca
2 changed files with 3 additions and 10 deletions
  1. +1
    -4
      windows/winmme/JackWinMMEInputPort.cpp
  2. +2
    -6
      windows/winmme/JackWinMMEOutputPort.cpp

+ 1
- 4
windows/winmme/JackWinMMEInputPort.cpp View File

@@ -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);


+ 2
- 6
windows/winmme/JackWinMMEOutputPort.cpp View File

@@ -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);


Loading…
Cancel
Save