Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Devin Anderson patch for Jack/CoreMIDI duplicated messages.
  • Loading branch information
sletz committed Aug 3, 2012
1 parent a176212 commit e6ab5e1
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions macosx/coremidi/JackCoreMidiOutputPort.cpp
Expand Up @@ -81,7 +81,11 @@ JackCoreMidiOutputPort::Execute()
packet = MIDIPacketListAdd(packet_list, PACKET_BUFFER_SIZE, packet,
timestamp, size, data);
if (packet) {
while (GetMicroSeconds() < send_time) {
do {
if (GetMicroSeconds() >= send_time) {
event = 0;
break;
}
event = GetCoreMidiEvent(false);
if (! event) {
break;
Expand All @@ -90,10 +94,7 @@ JackCoreMidiOutputPort::Execute()
packet,
GetTimeStampFromFrames(event->time),
event->size, event->buffer);
if (! packet) {
break;
}
}
} while (packet);
SendPacketList(packet_list);
} else {

Expand Down

0 comments on commit e6ab5e1

Please sign in to comment.