TracktionEngine
|
Represents an input device. More...
#include <tracktion_InputDevice.h>
Public Types | |
enum | DeviceType { waveDevice , trackWaveDevice , physicalMidiDevice , virtualMidiDevice , trackMidiDevice } |
enum to allow quick querying of the device type. More... | |
enum class | MonitorMode { off , automatic , on } |
Enum to describe monitor modes. More... | |
![]() | |
using | WeakRef = juce::WeakReference< Selectable > |
Public Member Functions | |
InputDevice (Engine &, juce::String type, juce::String name, juce::String deviceID) | |
~InputDevice () override | |
const juce::String & | getName () const |
const juce::String & | getType () const |
juce::String | getDeviceID () const |
virtual DeviceType | getDeviceType () const =0 |
bool | isTrackDevice () const |
juce::String | getAlias () const |
the alias is the name shown in the draggable input device components | |
void | setAlias (const juce::String &newAlias) |
virtual bool | isAvailableToEdit () const |
bool | isEnabled () const |
virtual void | setEnabled (bool)=0 |
virtual bool | isMidi () const |
MonitorMode | getMonitorMode () const |
void | setMonitorMode (MonitorMode) |
virtual InputDeviceInstance * | createInstance (EditPlaybackContext &)=0 |
Creates an instance to use for a given playback context. | |
virtual void | masterTimeUpdate (double time)=0 |
This is a bit of a hack but allows the time for MIDI devices to be set through the base class interface. | |
virtual void | updateRetrospectiveBufferLength (double length)=0 |
juce::String | getSelectableDescription () override |
Subclasses must return a description of what they are. | |
virtual void | saveProps ()=0 |
![]() | |
Selectable () | |
virtual | ~Selectable () |
virtual void | selectionStatusChanged (bool isNowSelected) |
Can be overridden to tell this object that it has just been selected or deselected. | |
virtual void | changed () |
This should be called to send a change notification to any SelectableListeners that are registered with this object. | |
virtual void | selectableAboutToBeDeleted () |
Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. | |
void | addListener (SelectableListener *) |
void | removeListener (SelectableListener *) |
void | addSelectableListener (SelectableListener *) |
void | removeSelectableListener (SelectableListener *) |
void | cancelAnyPendingUpdates () |
If changed() has been called, this will cancel any pending async change notificaions. | |
void | deselect () |
void | propertiesChanged () |
void | notifyListenersOfDeletion () |
WeakRef | getWeakRef () |
Static Public Member Functions | |
static void | setRetrospectiveLock (Engine &, const juce::Array< InputDeviceInstance * > &, bool lock) |
![]() | |
static void | initialise () |
static bool | isSelectableValid (const Selectable *) noexcept |
checks whether this object has been deleted. | |
Public Attributes | |
Engine & | engine |
LevelMeasurer | levelMeasurer |
![]() | |
WeakRef::Master | masterReference |
Protected Attributes | |
std::atomic< bool > | enabled { false } |
MonitorMode | monitorMode = MonitorMode::automatic |
MonitorMode | defaultMonitorMode = MonitorMode::automatic |
bool | retrospectiveRecordLock = false |
Represents an input device.
A single InputDevice object exists for each device in the system. For each InputDevice, there may be multiple InputDeviceInstance objects, for all the active EditPlaybackContexts
|
strong |
tracktion::engine::InputDevice::InputDevice | ( | Engine & | , |
juce::String | type, | ||
juce::String | name, | ||
juce::String | deviceID | ||
) |
|
override |
const juce::String & tracktion::engine::InputDevice::getName | ( | ) | const |
const juce::String & tracktion::engine::InputDevice::getType | ( | ) | const |
juce::String tracktion::engine::InputDevice::getDeviceID | ( | ) | const |
|
pure virtual |
bool tracktion::engine::InputDevice::isTrackDevice | ( | ) | const |
juce::String tracktion::engine::InputDevice::getAlias | ( | ) | const |
the alias is the name shown in the draggable input device components
void tracktion::engine::InputDevice::setAlias | ( | const juce::String & | newAlias | ) |
|
virtual |
Reimplemented in tracktion::engine::PhysicalMidiInputDevice.
References isEnabled().
bool tracktion::engine::InputDevice::isEnabled | ( | ) | const |
Referenced by isAvailableToEdit().
|
pure virtual |
|
virtual |
Reimplemented in tracktion::engine::MidiInputDevice.
MonitorMode tracktion::engine::InputDevice::getMonitorMode | ( | ) | const |
References monitorMode.
void tracktion::engine::InputDevice::setMonitorMode | ( | MonitorMode | ) |
|
pure virtual |
Creates an instance to use for a given playback context.
Implemented in tracktion::engine::PhysicalMidiInputDevice, tracktion::engine::VirtualMidiInputDevice, and tracktion::engine::WaveInputDevice.
|
pure virtual |
This is a bit of a hack but allows the time for MIDI devices to be set through the base class interface.
Implemented in tracktion::engine::MidiInputDevice, and tracktion::engine::WaveInputDevice.
|
static |
|
pure virtual |
Implemented in tracktion::engine::MidiInputDevice, and tracktion::engine::WaveInputDevice.
|
overridevirtual |
Subclasses must return a description of what they are.
Implements tracktion::engine::Selectable.
Reimplemented in tracktion::engine::VirtualMidiInputDevice, and tracktion::engine::WaveInputDevice.
Referenced by tracktion::engine::InputDeviceInstance::Destination::getSelectableDescription().
|
pure virtual |
Implemented in tracktion::engine::PhysicalMidiInputDevice, and tracktion::engine::VirtualMidiInputDevice.
Engine& tracktion::engine::InputDevice::engine |
LevelMeasurer tracktion::engine::InputDevice::levelMeasurer |
|
protected |
|
protected |
Referenced by getMonitorMode().
|
protected |
|
protected |