Browse Source

Make sure threaded log functions are set. Add MOM_POSITIONCB info.

tags/1.9.8
Devin Anderson 14 years ago
parent
commit
194ce1cd57
2 changed files with 13 additions and 2 deletions
  1. +2
    -1
      windows/winmme/JackWinMMEInputPort.cpp
  2. +11
    -1
      windows/winmme/JackWinMMEOutputPort.cpp

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

@@ -55,7 +55,7 @@ JackWinMMEInputPort::JackWinMMEInputPort(const char *alias_name,
sysex_buffer = new jack_midi_data_t[max_bytes];
char error_message[MAXERRORLENGTH];
MMRESULT result = midiInOpen(&handle, index, HandleMidiInputEvent, this,
CALLBACK_FUNCTION);
CALLBACK_FUNCTION | MIDI_IO_STATUS);
if (result != MMSYSERR_NOERROR) {
GetErrorString(result, error_message);
goto delete_sysex_buffer;
@@ -185,6 +185,7 @@ JackWinMMEInputPort::ProcessJack()
void
JackWinMMEInputPort::ProcessWinMME(UINT message, DWORD param1, DWORD param2)
{
set_threaded_log_function();
jack_nframes_t current_frame = GetCurrentFrame();
switch (message) {
case MIM_CLOSE:


+ 11
- 1
windows/winmme/JackWinMMEOutputPort.cpp View File

@@ -180,8 +180,11 @@ JackWinMMEOutputPort::Execute()
continue;
}
MIDIHDR header;
header.dwBufferLength = size;
header.dwBytesRecorded = size;
header.dwFlags = 0;
header.dwLength = size;
header.dwOffset = 0;
header.dwUser = 0;
header.lpData = data;
result = midiOutPrepareHeader(handle, &header, sizeof(MIDIHDR));
if (result != MMSYSERR_NOERROR) {
@@ -238,6 +241,7 @@ void
JackWinMMEOutputPort::HandleMessage(UINT message, DWORD_PTR param1,
DWORD_PTR param2)
{
set_threaded_log_function();
switch (message) {
case MOM_CLOSE:
jack_info("JackWinMMEOutputPort::HandleMessage - MIDI device closed.");
@@ -250,6 +254,12 @@ JackWinMMEOutputPort::HandleMessage(UINT message, DWORD_PTR param1,
break;
case MOM_OPEN:
jack_info("JackWinMMEOutputPort::HandleMessage - MIDI device opened.");
break;
case MOM_POSITIONCB:
LPMIDIHDR header = (LPMIDIHDR) param2;
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