From a9bae292afdc7995839e5c8a0be4bdae24260ea3 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Sun, 26 Dec 2021 18:37:43 -0500 Subject: [PATCH] Don't set RtMidi input message thread name since it can be called 1000+ times/sec. --- src/rtmidi.cpp | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/rtmidi.cpp b/src/rtmidi.cpp index c0605480..946fc9fe 100644 --- a/src/rtmidi.cpp +++ b/src/rtmidi.cpp @@ -74,16 +74,14 @@ struct RtMidiInputDevice : midi::InputDevice { if (!userData) return; - system::setThreadName("RtMidi input"); - - RtMidiInputDevice* midiInputDevice = (RtMidiInputDevice*) userData; - if (!midiInputDevice) + RtMidiInputDevice* that = (RtMidiInputDevice*) userData; + if (!that) return; midi::Message msg; msg.bytes = std::vector(message->begin(), message->end()); // Don't set msg.frame from timeStamp here, because it's set in onMessage(). - midiInputDevice->onMessage(msg); + that->onMessage(msg); } };