68 bool operator== (
const MidiDeviceInfo& other)
const noexcept {
return name == other.name && identifier == other.identifier; }
69 bool operator!= (
const MidiDeviceInfo& other)
const noexcept {
return ! operator== (other); }
115 #if JUCE_LINUX || JUCE_MAC || JUCE_IOS || DOXYGEN 161 void setName (
const String& newName) noexcept { deviceInfo.name = newName; }
167 static int getDefaultDeviceIndex();
176 void*
internal =
nullptr;
178 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
MidiInput)
210 virtual void handleIncomingMidiMessage (
MidiInput* source,
224 const uint8* messageData,
228 ignoreUnused (source, messageData, numBytesSoFar, timestamp);
269 static std::unique_ptr<MidiOutput> openDevice (
const String& deviceIdentifier);
271 #if JUCE_LINUX || JUCE_MAC || JUCE_IOS || DOXYGEN 284 static std::unique_ptr<MidiOutput> createNewDevice (
const String& deviceName);
301 void setName (
const String& newName) noexcept { deviceInfo.name = newName; }
308 void sendBlockOfMessagesNow (
const MidiBuffer& buffer);
327 void sendBlockOfMessages (
const MidiBuffer& buffer,
328 double millisecondCounterToStartAt,
329 double samplesPerSecondForBuffer);
332 void clearAllPendingMessages();
337 void startBackgroundThread();
342 void stopBackgroundThread();
348 static int getDefaultDeviceIndex();
350 static std::unique_ptr<MidiOutput> openDevice (
int);
354 struct PendingMessage
356 PendingMessage (
const void* data,
int len,
double timeStamp)
357 : message (data, len, timeStamp)
362 PendingMessage* next;
370 void*
internal =
nullptr;
372 PendingMessage* firstMessage =
nullptr;
374 JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (
MidiOutput)
String getIdentifier() const noexcept
Returns the identifier of this device.
#define JUCE_API
This macro is added to all JUCE public class declarations.
Encapsulates a MIDI message.
String identifier
The identifier for this device.
String getName() const noexcept
Returns the name of this device.
A special array for holding a list of strings.
This struct contains information about a MIDI input or output device.
Holds a resizable array of primitive or copy-by-value objects.
Holds a sequence of time-stamped midi events.
Represents a midi output device.
String name
The name of this device.
MidiDeviceInfo getDeviceInfo() const noexcept
Returns the MidiDeviceInfo struct containing some information about this device.
void setName(const String &newName) noexcept
Sets a custom name for the device.