To find out when the available MIDI devices change, call MidiDeviceListConnection::make(), passing a lambda that will be called on each configuration change.
More...
#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");
});
void reset() noexcept
Clears this connection.
Definition juce_MidiDevices.h:94
static MidiDeviceListConnection make(std::function< void()>)
Registers a function to be called whenever the midi device list changes.
#define DBG(textToWrite)
Writes a string to the standard error stream.
Definition juce_PlatformDefs.h:160
◆ Key
◆ MidiDeviceListConnection() [1/3]
MidiDeviceListConnection::MidiDeviceListConnection |
( |
| ) |
|
|
default |
◆ MidiDeviceListConnection() [2/3]
◆ MidiDeviceListConnection() [3/3]
◆ ~MidiDeviceListConnection()
MidiDeviceListConnection::~MidiDeviceListConnection |
( |
| ) |
|
|
noexcept |
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ reset()
void MidiDeviceListConnection::reset |
( |
| ) |
|
|
noexcept |
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.
References MidiDeviceListConnection().
◆ 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.
The documentation for this class was generated from the following file: