64 bool operator== (
const MidiDeviceInfo& other)
const noexcept {
return name == other.name && identifier == other.identifier; }
65 bool operator!= (
const MidiDeviceInfo& other)
const noexcept {
return ! operator== (other); }
111 #if JUCE_LINUX || JUCE_MAC || JUCE_IOS || DOXYGEN 157 void setName (
const String& newName) noexcept { deviceInfo.name = newName; }
163 static int getDefaultDeviceIndex();
172 void*
internal =
nullptr;
174 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
MidiInput)
206 virtual void handleIncomingMidiMessage (
MidiInput* source,
220 const uint8* messageData,
224 ignoreUnused (source, messageData, numBytesSoFar, timestamp);
265 static std::unique_ptr<MidiOutput> openDevice (
const String& deviceIdentifier);
267 #if JUCE_LINUX || JUCE_MAC || JUCE_IOS || DOXYGEN 280 static std::unique_ptr<MidiOutput> createNewDevice (
const String& deviceName);
297 void setName (
const String& newName) noexcept { deviceInfo.name = newName; }
304 void sendBlockOfMessagesNow (
const MidiBuffer& buffer);
323 void sendBlockOfMessages (
const MidiBuffer& buffer,
324 double millisecondCounterToStartAt,
325 double samplesPerSecondForBuffer);
328 void clearAllPendingMessages();
333 void startBackgroundThread();
338 void stopBackgroundThread();
344 static int getDefaultDeviceIndex();
346 static std::unique_ptr<MidiOutput> openDevice (
int);
350 struct PendingMessage
352 PendingMessage (
const void* data,
int len,
double timeStamp)
353 : message (data, len, timeStamp)
358 PendingMessage* next;
366 void*
internal =
nullptr;
368 PendingMessage* firstMessage =
nullptr;
370 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
MidiOutput)
String getIdentifier() const noexcept
String getName() const noexcept
MidiDeviceInfo getDeviceInfo() const noexcept
void setName(const String &newName) noexcept