JUCE  v6.1.6 (6.0.8-1114)
JUCE API
Looking for a senior C++ dev?
I'm looking for work. Hire me!
juce::MidiDeviceInfo Struct Reference

This struct contains information about a MIDI input or output device. More...

#include <juce_MidiDevices.h>

Collaboration diagram for juce::MidiDeviceInfo:

Public Member Functions

 MidiDeviceInfo ()=default
 
 MidiDeviceInfo (const String &deviceName, const String &deviceIdentifier)
 
bool operator!= (const MidiDeviceInfo &other) const noexcept
 
bool operator== (const MidiDeviceInfo &other) const noexcept
 

Public Attributes

String identifier
 The identifier for this device. More...
 
String name
 The name of this device. More...
 

Detailed Description

This struct contains information about a MIDI input or output device.

You can get one of these structs by calling the static getAvailableDevices() or getDefaultDevice() methods of MidiInput and MidiOutput or by calling getDeviceInfo() on an instance of these classes. Devices can be opened by passing the identifier to the openDevice() method.

@tags{Audio}

Constructor & Destructor Documentation

◆ MidiDeviceInfo() [1/2]

juce::MidiDeviceInfo::MidiDeviceInfo ( )
default

◆ MidiDeviceInfo() [2/2]

juce::MidiDeviceInfo::MidiDeviceInfo ( const String deviceName,
const String deviceIdentifier 
)
inline

Member Function Documentation

◆ operator!=()

bool juce::MidiDeviceInfo::operator!= ( const MidiDeviceInfo other) const
inlinenoexcept

References operator==().

◆ operator==()

bool juce::MidiDeviceInfo::operator== ( const MidiDeviceInfo other) const
inlinenoexcept

References identifier, and name.

Referenced by operator!=().

Member Data Documentation

◆ identifier

String juce::MidiDeviceInfo::identifier

The identifier for this device.

This will be provided by the OS and it's format will differ on different systems e.g. on macOS it will be a number whereas on Windows it will be a long alphanumeric string.

Referenced by operator==().

◆ name

String juce::MidiDeviceInfo::name

The name of this device.

This will be provided by the OS unless the device has been created with the createNewDevice() method.

Note that the name is not guaranteed to be unique and two devices with the same name will be indistinguishable. If you want to address a specific device it is better to use the identifier.

Referenced by operator==().


The documentation for this struct was generated from the following file: