Skip to content

Commit f48425f

Browse files
committed
Handle MIDI output the same way JUCE does it by default
1 parent 49c9bb8 commit f48425f

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

Source/Utility/MidiDeviceManager.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,12 @@ class MidiDeviceManager final : public ChangeListener
287287

288288
if (!outputPort.buffer.isEmpty()) {
289289
for (auto* device : outputPort.devices) {
290-
device->sendBlockOfMessages(outputPort.buffer, Time::getMillisecondCounterHiRes(), currentSampleRate);
290+
if (device->isBackgroundThreadRunning()) {
291+
device->sendBlockOfMessages (outputPort.buffer, Time::getMillisecondCounterHiRes(), currentSampleRate);
292+
}
293+
else {
294+
device->sendBlockOfMessagesNow (outputPort.buffer);
295+
}
291296
}
292297
}
293298
}

0 commit comments

Comments
 (0)