Browse Source

WinMME: Add debugging code to input events in an effort to solve latency and jitter issues. Minor change to output port error message.

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

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

@@ -139,7 +139,17 @@ void
JackWinMMEInputPort::EnqueueMessage(DWORD timestamp, size_t length,
jack_midi_data_t *data)
{
jack_nframes_t frame = GetFramesFromTime(start_time + (timestamp * 1000));
jack_nframes_t frame =
GetFramesFromTime(start_time + (((jack_time_t) timestamp) * 1000));

// Debugging code
jack_time_t current_time = GetMicroSeconds();
jack_log("JackWinMMEInputPort::EnqueueMessage - enqueueing event at %f "
"(frame: %d) with start offset '%d' scheduled for frame '%d'",
((double) current_time) / 1000.0, GetFramesFromTime(current_time),
timestamp, frame);
// End debugging code

switch (thread_queue->EnqueueEvent(frame, length, data)) {
case JackMidiWriteQueue::BUFFER_FULL:
jack_error("JackWinMMEInputPort::EnqueueMessage - The thread queue "


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

@@ -149,7 +149,7 @@ JackWinMMEOutputPort::Execute()
-((LONGLONG) ((frame_time - current_time) * 10));
if (! SetWaitableTimer(timer, &due_time, 0, NULL, NULL, 0)) {
WriteOSError("JackWinMMEOutputPort::Execute",
"ChangeTimerQueueTimer");
"SetWaitableTimer");
break;
}



Loading…
Cancel
Save