TracktionEngine
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
tracktion::engine::WaveInputDevice Class Reference

A (virtual) audio input device. More...

Inheritance diagram for tracktion::engine::WaveInputDevice:

Public Member Functions

 WaveInputDevice (Engine &, const juce::String &name, const juce::String &type, const std::vector< ChannelIndex > &, DeviceType)
 
 ~WaveInputDevice () override
 
juce::StringArray getRecordFormatNames ()
 
void resetToDefault ()
 
void setEnabled (bool) override
 
DeviceType getDeviceType () const override
 
InputDeviceInstancecreateInstance (EditPlaybackContext &) override
 Creates an instance to use for a given playback context. More...
 
void flipEndToEnd () override
 
void setEndToEnd (bool)
 
void setRecordAdjustmentMs (double ms)
 
double getRecordAdjustmentMs () const
 
bool isStereoPair () const
 
void setStereoPair (bool)
 
juce::Array< int > getAvailableBitDepths () const
 
void setBitDepth (int)
 
int getBitDepth () const
 
void checkBitDepth ()
 
void setInputGainDb (float gain)
 
float getInputGainDb () const
 
void setRecordTriggerDb (float)
 
float getRecordTriggerDb () const
 
void setFilenameMask (const juce::String &)
 
juce::String getFilenameMask () const
 
void setFilenameMaskToDefault ()
 
void setOutputFormat (const juce::String &)
 
juce::String getOutputFormat () const
 
void setMergeMode (const juce::String &)
 
juce::String getMergeMode () const
 
const std::vector< ChannelIndex > & getChannels () const noexcept
 
const juce::AudioChannelSet & getChannelSet () const noexcept
 
void masterTimeUpdate (double) override
 This is a bit of a hack but allows the time for MIDI devices to be set through the base class interface. More...
 
void consumeNextAudioBlock (const float *const *allChannels, int numChannels, int numSamples, double streamTime)
 
RetrospectiveRecordBuffer * getRetrospectiveRecordBuffer ()
 
void updateRetrospectiveBufferLength (double length) override
 
juce::String getSelectableDescription () override
 Subclasses must return a description of what they are. More...
 
- Public Member Functions inherited from tracktion::engine::InputDevice
 InputDevice (Engine &, const juce::String &type, const juce::String &name)
 
 ~InputDevice () override
 
const juce::String & getName () const
 
const juce::String & getType () const
 
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 bool isMidi () const
 
bool isEndToEndEnabled () const
 
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 juce::StringArray getMergeModes ()
 
static juce::String getDefaultMask ()
 
- Static Public Member Functions inherited from tracktion::engine::InputDevice
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...
 

Protected Member Functions

juce::String openDevice ()
 
void closeDevice ()
 

Additional Inherited Members

- Public Types inherited from tracktion::engine::InputDevice
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 Attributes inherited from tracktion::engine::InputDevice
Engineengine
 
LevelMeasurer levelMeasurer
 
- Public Attributes inherited from tracktion::engine::Selectable
WeakRef::Master masterReference
 
- Protected Attributes inherited from tracktion::engine::InputDevice
std::atomic< bool > enabled { false }
 
bool endToEndEnabled = false
 
bool retrospectiveRecordLock = false
 

Detailed Description

A (virtual) audio input device.

There'll be multiple instances of these, representing mono or stereo pairs of input channels.

Constructor & Destructor Documentation

◆ WaveInputDevice()

tracktion::engine::WaveInputDevice::WaveInputDevice ( Engine ,
const juce::String &  name,
const juce::String &  type,
const std::vector< ChannelIndex > &  ,
DeviceType   
)

◆ ~WaveInputDevice()

tracktion::engine::WaveInputDevice::~WaveInputDevice ( )
override

Member Function Documentation

◆ getMergeModes()

static juce::StringArray tracktion::engine::WaveInputDevice::getMergeModes ( )
static

◆ getRecordFormatNames()

juce::StringArray tracktion::engine::WaveInputDevice::getRecordFormatNames ( )

◆ resetToDefault()

void tracktion::engine::WaveInputDevice::resetToDefault ( )

◆ setEnabled()

void tracktion::engine::WaveInputDevice::setEnabled ( bool  )
overridevirtual

◆ getDeviceType()

DeviceType tracktion::engine::WaveInputDevice::getDeviceType ( ) const
overridevirtual

◆ createInstance()

InputDeviceInstance* tracktion::engine::WaveInputDevice::createInstance ( EditPlaybackContext )
overridevirtual

Creates an instance to use for a given playback context.

Implements tracktion::engine::InputDevice.

◆ flipEndToEnd()

void tracktion::engine::WaveInputDevice::flipEndToEnd ( )
overridevirtual

◆ setEndToEnd()

void tracktion::engine::WaveInputDevice::setEndToEnd ( bool  )

◆ setRecordAdjustmentMs()

void tracktion::engine::WaveInputDevice::setRecordAdjustmentMs ( double  ms)

◆ getRecordAdjustmentMs()

double tracktion::engine::WaveInputDevice::getRecordAdjustmentMs ( ) const

◆ isStereoPair()

bool tracktion::engine::WaveInputDevice::isStereoPair ( ) const

◆ setStereoPair()

void tracktion::engine::WaveInputDevice::setStereoPair ( bool  )

◆ getAvailableBitDepths()

juce::Array<int> tracktion::engine::WaveInputDevice::getAvailableBitDepths ( ) const

◆ setBitDepth()

void tracktion::engine::WaveInputDevice::setBitDepth ( int  )

◆ getBitDepth()

int tracktion::engine::WaveInputDevice::getBitDepth ( ) const

◆ checkBitDepth()

void tracktion::engine::WaveInputDevice::checkBitDepth ( )

◆ setInputGainDb()

void tracktion::engine::WaveInputDevice::setInputGainDb ( float  gain)

◆ getInputGainDb()

float tracktion::engine::WaveInputDevice::getInputGainDb ( ) const

◆ setRecordTriggerDb()

void tracktion::engine::WaveInputDevice::setRecordTriggerDb ( float  )

◆ getRecordTriggerDb()

float tracktion::engine::WaveInputDevice::getRecordTriggerDb ( ) const

◆ setFilenameMask()

void tracktion::engine::WaveInputDevice::setFilenameMask ( const juce::String &  )

◆ getFilenameMask()

juce::String tracktion::engine::WaveInputDevice::getFilenameMask ( ) const

◆ setFilenameMaskToDefault()

void tracktion::engine::WaveInputDevice::setFilenameMaskToDefault ( )

◆ getDefaultMask()

static juce::String tracktion::engine::WaveInputDevice::getDefaultMask ( )
static

◆ setOutputFormat()

void tracktion::engine::WaveInputDevice::setOutputFormat ( const juce::String &  )

◆ getOutputFormat()

juce::String tracktion::engine::WaveInputDevice::getOutputFormat ( ) const

◆ setMergeMode()

void tracktion::engine::WaveInputDevice::setMergeMode ( const juce::String &  )

◆ getMergeMode()

juce::String tracktion::engine::WaveInputDevice::getMergeMode ( ) const

◆ getChannels()

const std::vector<ChannelIndex>& tracktion::engine::WaveInputDevice::getChannels ( ) const
noexcept

◆ getChannelSet()

const juce::AudioChannelSet& tracktion::engine::WaveInputDevice::getChannelSet ( ) const
noexcept

◆ masterTimeUpdate()

void tracktion::engine::WaveInputDevice::masterTimeUpdate ( double  time)
overridevirtual

This is a bit of a hack but allows the time for MIDI devices to be set through the base class interface.

Implements tracktion::engine::InputDevice.

◆ consumeNextAudioBlock()

void tracktion::engine::WaveInputDevice::consumeNextAudioBlock ( const float *const *  allChannels,
int  numChannels,
int  numSamples,
double  streamTime 
)

◆ getRetrospectiveRecordBuffer()

RetrospectiveRecordBuffer* tracktion::engine::WaveInputDevice::getRetrospectiveRecordBuffer ( )

◆ updateRetrospectiveBufferLength()

void tracktion::engine::WaveInputDevice::updateRetrospectiveBufferLength ( double  length)
overridevirtual

◆ getSelectableDescription()

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

Subclasses must return a description of what they are.

Reimplemented from tracktion::engine::InputDevice.

◆ openDevice()

juce::String tracktion::engine::WaveInputDevice::openDevice ( )
protected

◆ closeDevice()

void tracktion::engine::WaveInputDevice::closeDevice ( )
protected

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