#include <juce_MidiDevices.h>
To find out when the available MIDI devices change, call MidiDeviceListConnection::make(), passing a lambda that will be called on each configuration change.
To stop the lambda receiving callbacks, destroy the MidiDeviceListConnection instance returned from make(), or call reset() on it.
{
DBG ("MIDI devices changed");
});
static MidiDeviceListConnection make(std::function< void()>)
Definition at line 49 of file juce_MidiDevices.h.
◆ Key
using juce::MidiDeviceListConnection::Key = uint64_t |
◆ MidiDeviceListConnection() [1/2]
juce::MidiDeviceListConnection::MidiDeviceListConnection |
( |
| ) |
|
|
default |
Constructs an inactive connection.
Referenced by reset().
◆ MidiDeviceListConnection() [2/2]
◆ ~MidiDeviceListConnection()
juce::MidiDeviceListConnection::~MidiDeviceListConnection |
( |
| ) |
|
|
noexcept |
◆ make()
Registers a function to be called whenever the midi device list changes.
The callback will only be active for as long as the return MidiDeviceListConnection remains alive. To stop receiving device change notifications, destroy the Connection object, e.g. by allowing it to fall out of scope.
◆ operator=()
◆ reset()
void juce::MidiDeviceListConnection::reset |
( |
| ) |
|
|
inlinenoexcept |
Clears this connection.
If this object had an active connection, that connection will be deactivated, and the corresponding callback will be removed from the MidiDeviceListConnectionBroadcaster.
Definition at line 79 of file juce_MidiDevices.h.
The documentation for this class was generated from the following files: