TracktionEngine
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...

Inheritance diagram for tracktion::engine::InputDevice:

Public Types

enum  DeviceType {
  waveDevice , trackWaveDevice , physicalMidiDevice , virtualMidiDevice ,
  trackMidiDevice
}
 enum to allow quick querying of the device type. More...
 
- Public Types inherited from tracktion::engine::Selectable
using WeakRef = juce::WeakReference< Selectable >
 

Public Member Functions

 InputDevice (Engine &, const juce::String &type, const juce::String &name)
 
 ~InputDevice () override
 
const juce::String & getName () const
 
const juce::String & getType () 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 More...
 
void setAlias (const juce::String &newAlias)
 
void initialiseDefaultAlias ()
 Called after all devices are constructed, so it can use all the device names in its calculations. More...
 
virtual bool isAvailableToEdit () const
 
bool isEnabled () const
 
virtual void setEnabled (bool)=0
 
virtual bool isMidi () const
 
bool isEndToEndEnabled () const
 
virtual void flipEndToEnd ()=0
 
virtual InputDeviceInstancecreateInstance (EditPlaybackContext &)=0
 Creates an instance to use for a given playback context. More...
 
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. More...
 
virtual void updateRetrospectiveBufferLength (double length)=0
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are. More...
 
juce::String getGlobalPropertyName () const
 
- Public Member Functions inherited from tracktion::engine::Selectable
 Selectable ()
 
virtual ~Selectable ()
 
virtual void selectionStatusChanged (bool isNowSelected)
 Can be overridden to tell this object that it has just been selected or deselected. More...
 
virtual void changed ()
 This should be called to send a change notification to any SelectableListeners that are registered with this object. More...
 
virtual void selectableAboutToBeDeleted ()
 Called just before the selectable is about to be deleted so any subclasses should still be valid at this point. More...
 
void addSelectableListener (SelectableListener *)
 
void removeSelectableListener (SelectableListener *)
 
void cancelAnyPendingUpdates ()
 If changed() has been called, this will cancel any pending async change notificaions. More...
 
void deselect ()
 
void propertiesChanged ()
 
void notifyListenersOfDeletion ()
 
WeakRef getWeakRef ()
 

Static Public Member Functions

static void setRetrospectiveLock (Engine &engine, const juce::Array< InputDeviceInstance * > &devices, 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. More...
 

Public Attributes

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

Protected Attributes

std::atomic< bool > enabled { false }
 
bool endToEndEnabled = false
 
bool retrospectiveRecordLock = false
 

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

Member Enumeration Documentation

◆ DeviceType

enum to allow quick querying of the device type.

Enumerator
waveDevice 
trackWaveDevice 
physicalMidiDevice 
virtualMidiDevice 
trackMidiDevice 

Constructor & Destructor Documentation

◆ InputDevice()

tracktion::engine::InputDevice::InputDevice ( Engine ,
const juce::String &  type,
const juce::String &  name 
)

◆ ~InputDevice()

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

Member Function Documentation

◆ getName()

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

◆ getType()

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

◆ getDeviceType()

virtual DeviceType tracktion::engine::InputDevice::getDeviceType ( ) const
pure virtual

◆ isTrackDevice()

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

◆ getAlias()

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

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

◆ setAlias()

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

◆ initialiseDefaultAlias()

void tracktion::engine::InputDevice::initialiseDefaultAlias ( )

Called after all devices are constructed, so it can use all the device names in its calculations.

◆ isAvailableToEdit()

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

◆ isEnabled()

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

Referenced by isAvailableToEdit().

◆ setEnabled()

virtual void tracktion::engine::InputDevice::setEnabled ( bool  )
pure virtual

◆ isMidi()

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

◆ isEndToEndEnabled()

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

References endToEndEnabled.

◆ flipEndToEnd()

virtual void tracktion::engine::InputDevice::flipEndToEnd ( )
pure virtual

◆ createInstance()

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

Creates an instance to use for a given playback context.

Implemented in tracktion::engine::WaveInputDevice, tracktion::engine::VirtualMidiInputDevice, and tracktion::engine::PhysicalMidiInputDevice.

◆ 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::WaveInputDevice, and tracktion::engine::MidiInputDevice.

◆ setRetrospectiveLock()

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

◆ updateRetrospectiveBufferLength()

virtual void tracktion::engine::InputDevice::updateRetrospectiveBufferLength ( double  length)
pure virtual

◆ getSelectableDescription()

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

◆ getGlobalPropertyName()

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

Member Data Documentation

◆ engine

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

◆ levelMeasurer

LevelMeasurer tracktion::engine::InputDevice::levelMeasurer

◆ enabled

std::atomic<bool> tracktion::engine::InputDevice::enabled { false }
protected

◆ endToEndEnabled

bool tracktion::engine::InputDevice::endToEndEnabled = false
protected

◆ retrospectiveRecordLock

bool tracktion::engine::InputDevice::retrospectiveRecordLock = false
protected

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