tracktion-engine 3.0-10-g034fdde4aa5
Tracktion Engine — High level data model for audio applications

« « « Anklang Documentation
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
tracktion::engine::InputDevice Class Referenceabstract

Represents an input device. More...

#include "tracktion_InputDevice.h"

Inheritance diagram for tracktion::engine::InputDevice:
tracktion::engine::Selectable tracktion::engine::MidiInputDevice tracktion::engine::WaveInputDevice tracktion::engine::HostedMidiInputDevice tracktion::engine::PhysicalMidiInputDevice tracktion::engine::VirtualMidiInputDevice

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...
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 

Public Member Functions

 InputDevice (Engine &, juce::String type, juce::String name, juce::String deviceID)
 
const juce::StringgetName () const
 
const juce::StringgetType () 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 InputDeviceInstancecreateInstance (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
 
- Public Member Functions inherited from tracktion::engine::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 Public Member Functions inherited from tracktion::engine::Selectable
static void initialise ()
 
static bool isSelectableValid (const Selectable *) noexcept
 checks whether this object has been deleted.
 

Public Attributes

Engineengine
 
LevelMeasurer levelMeasurer
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 

Protected Attributes

std::atomic< bool > enabled
 
MonitorMode monitorMode
 
MonitorMode defaultMonitorMode
 
bool retrospectiveRecordLock
 

Detailed Description

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

Definition at line 21 of file tracktion_InputDevice.h.

Member Enumeration Documentation

◆ DeviceType

enum to allow quick querying of the device type.

Definition at line 25 of file tracktion_InputDevice.h.

◆ MonitorMode

Enum to describe monitor modes.

Enumerator
off 

Live input is never audible.

automatic 

Live input is audible when record is enabled.

on 

Live input is always audible.

Definition at line 59 of file tracktion_InputDevice.h.

Constructor & Destructor Documentation

◆ InputDevice()

tracktion::engine::InputDevice::InputDevice ( Engine e,
juce::String  type,
juce::String  name,
juce::String  deviceID 
)

Definition at line 14 of file tracktion_InputDevice.cpp.

◆ ~InputDevice()

tracktion::engine::InputDevice::~InputDevice ( )
override

Definition at line 20 of file tracktion_InputDevice.cpp.

Member Function Documentation

◆ createInstance()

virtual InputDeviceInstance * tracktion::engine::InputDevice::createInstance ( EditPlaybackContext )
pure virtual

◆ getAlias()

juce::String tracktion::engine::InputDevice::getAlias ( ) const

the alias is the name shown in the draggable input device components

Definition at line 35 of file tracktion_InputDevice.cpp.

◆ getDeviceID()

juce::String tracktion::engine::InputDevice::getDeviceID ( ) const

Definition at line 42 of file tracktion_InputDevice.h.

◆ getMonitorMode()

MonitorMode tracktion::engine::InputDevice::getMonitorMode ( ) const

Definition at line 66 of file tracktion_InputDevice.h.

◆ getName()

const juce::String & tracktion::engine::InputDevice::getName ( ) const

Definition at line 39 of file tracktion_InputDevice.h.

◆ getSelectableDescription()

juce::String tracktion::engine::InputDevice::getSelectableDescription ( )
overridevirtual

Subclasses must return a description of what they are.

Implements tracktion::engine::Selectable.

Reimplemented in tracktion::engine::VirtualMidiInputDevice, and tracktion::engine::WaveInputDevice.

Definition at line 75 of file tracktion_InputDevice.cpp.

◆ getType()

const juce::String & tracktion::engine::InputDevice::getType ( ) const

Definition at line 40 of file tracktion_InputDevice.h.

◆ isAvailableToEdit()

virtual bool tracktion::engine::InputDevice::isAvailableToEdit ( ) const
virtual

Definition at line 51 of file tracktion_InputDevice.h.

◆ isEnabled()

bool tracktion::engine::InputDevice::isEnabled ( ) const

Definition at line 59 of file tracktion_InputDevice.cpp.

◆ isMidi()

virtual bool tracktion::engine::InputDevice::isMidi ( ) const
virtual

Definition at line 56 of file tracktion_InputDevice.h.

◆ isTrackDevice()

bool tracktion::engine::InputDevice::isTrackDevice ( ) const

Definition at line 29 of file tracktion_InputDevice.cpp.

◆ masterTimeUpdate()

virtual void tracktion::engine::InputDevice::masterTimeUpdate ( double  time)
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.

◆ setAlias()

void tracktion::engine::InputDevice::setAlias ( const juce::String newAlias)

Definition at line 43 of file tracktion_InputDevice.cpp.

◆ setMonitorMode()

void tracktion::engine::InputDevice::setMonitorMode ( MonitorMode  newMode)

Definition at line 64 of file tracktion_InputDevice.cpp.

◆ setRetrospectiveLock()

void tracktion::engine::InputDevice::setRetrospectiveLock ( Engine e,
const juce::Array< InputDeviceInstance * > &  devices,
bool  lock 
)
static

Definition at line 80 of file tracktion_InputDevice.cpp.

Member Data Documentation

◆ defaultMonitorMode

MonitorMode tracktion::engine::InputDevice::defaultMonitorMode
protected

Definition at line 89 of file tracktion_InputDevice.h.

◆ enabled

std::atomic<bool> tracktion::engine::InputDevice::enabled
protected

Definition at line 87 of file tracktion_InputDevice.h.

◆ engine

Engine& tracktion::engine::InputDevice::engine

Definition at line 83 of file tracktion_InputDevice.h.

◆ levelMeasurer

LevelMeasurer tracktion::engine::InputDevice::levelMeasurer

Definition at line 84 of file tracktion_InputDevice.h.

◆ monitorMode

MonitorMode tracktion::engine::InputDevice::monitorMode
protected

Definition at line 88 of file tracktion_InputDevice.h.

◆ retrospectiveRecordLock

bool tracktion::engine::InputDevice::retrospectiveRecordLock
protected

Definition at line 90 of file tracktion_InputDevice.h.


The documentation for this class was generated from the following files: