Skip to content
This repository
Browse code

Devin Anderson patch for Jack/CoreMIDI duplicated messages.

  • Loading branch information...
commit e6ab5e1803c5489acf9c2e0cbcce02903a043b1e 1 parent a176212
Stéphane Letz sletz authored

Showing 1 changed file with 6 additions and 5 deletions. Show diff stats Hide diff stats

  1. +6 5 macosx/coremidi/JackCoreMidiOutputPort.cpp
11 macosx/coremidi/JackCoreMidiOutputPort.cpp
@@ -81,7 +81,11 @@ JackCoreMidiOutputPort::Execute()
81 81 packet = MIDIPacketListAdd(packet_list, PACKET_BUFFER_SIZE, packet,
82 82 timestamp, size, data);
83 83 if (packet) {
84   - while (GetMicroSeconds() < send_time) {
  84 + do {
  85 + if (GetMicroSeconds() >= send_time) {
  86 + event = 0;
  87 + break;
  88 + }
85 89 event = GetCoreMidiEvent(false);
86 90 if (! event) {
87 91 break;
@@ -90,10 +94,7 @@ JackCoreMidiOutputPort::Execute()
90 94 packet,
91 95 GetTimeStampFromFrames(event->time),
92 96 event->size, event->buffer);
93   - if (! packet) {
94   - break;
95   - }
96   - }
  97 + } while (packet);
97 98 SendPacketList(packet_list);
98 99 } else {
99 100

0 comments on commit e6ab5e1

Please sign in to comment.
Something went wrong with that request. Please try again.