Browse Source

Don't set RtMidi input message thread name since it can be called 1000+ times/sec.

tags/v2.0.5
Andrew Belt 2 years ago
parent
commit
a9bae292af
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      src/rtmidi.cpp

+ 3
- 5
src/rtmidi.cpp View File

@@ -74,16 +74,14 @@ struct RtMidiInputDevice : midi::InputDevice {
if (!userData) if (!userData)
return; return;


system::setThreadName("RtMidi input");

RtMidiInputDevice* midiInputDevice = (RtMidiInputDevice*) userData;
if (!midiInputDevice)
RtMidiInputDevice* that = (RtMidiInputDevice*) userData;
if (!that)
return; return;


midi::Message msg; midi::Message msg;
msg.bytes = std::vector<uint8_t>(message->begin(), message->end()); msg.bytes = std::vector<uint8_t>(message->begin(), message->end());
// Don't set msg.frame from timeStamp here, because it's set in onMessage(). // Don't set msg.frame from timeStamp here, because it's set in onMessage().
midiInputDevice->onMessage(msg);
that->onMessage(msg);
} }
}; };




Loading…
Cancel
Save