TracktionEngine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
engine::WaveInputDevice Class Reference

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

#include <tracktion_WaveInputDevice.h>

Inheritance diagram for engine::WaveInputDevice:

Public Member Functions

 WaveInputDevice (Engine &, const WaveDeviceDescription &, DeviceType)
 
 ~WaveInputDevice () override
 
juce::StringArray getRecordFormatNames ()
 
void resetToDefault ()
 
void setEnabled (bool) override
 
DeviceType getDeviceType () const override
 
juce::String getDeviceTypeDescription () const override
 
InputDeviceInstancecreateInstance (EditPlaybackContext &) override
 Creates an instance to use for a given playback context.
 
void setRecordAdjustment (TimeDuration)
 
TimeDuration getRecordAdjustment () const
 
void setRecordAdjustmentMs (double ms)
 
double getRecordAdjustmentMs () const
 
bool isStereoPair () const
 
void setStereoPair (bool)
 
juce::PopupMenu createChannelGroupMenu (bool includeSetAllChannelsOptions)
 
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 setMeterGateClosed (bool)
 Closes or opens the input meter gate.
 
bool isMeterGateClosed () const noexcept
 
bool isAnyRecordingActive () const
 True if any of this device's instances currently has an active recording context.
 
juce::String getFilenameMask () const
 
void setFilenameMask (const juce::String &)
 
void setFilenameMaskToDefault ()
 
void setOutputFormat (const juce::String &)
 
juce::String getOutputFormat () const
 
void setMergeMode (const juce::String &)
 
juce::String getMergeMode () const
 
const ChannelConfiguration & getChannels () const noexcept
 
const juce::AudioChannelSet & getChannelSet () const noexcept
 
void setChannelConfiguration (const ChannelConfiguration &)
 Updates the channel configuration for track devices.
 
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.
 
void consumeNextAudioBlock (const float *const *allChannels, int numChannels, int numSamples, double streamTime)
 
RetrospectiveRecordBuffer * getRetrospectiveRecordBuffer ()
 
void updateRetrospectiveBufferLength (double length) override
 
- Public Member Functions inherited from engine::InputDevice
 InputDevice (Engine &, juce::String name, juce::String deviceID)
 
 ~InputDevice () override
 
bool isTrackDevice () const override
 
virtual bool isAvailableToEdit () const
 
bool isMidi () const override
 
MonitorMode getMonitorMode () const
 
void setMonitorMode (MonitorMode)
 

Static Public Member Functions

static juce::StringArray getMergeModes ()
 
- Static Public Member Functions inherited from engine::InputDevice
static void setRetrospectiveLock (Engine &, const juce::Array< InputDeviceInstance * > &, bool lock)
 

Public Attributes

WaveDeviceDescription deviceDescription
 
- Public Attributes inherited from engine::InputDevice
LevelMeasurer levelMeasurer
 

Protected Member Functions

juce::String openDevice ()
 
void closeDevice ()
 

Additional Inherited Members

- Public Types inherited from engine::InputDevice
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...
 
- Protected Attributes inherited from engine::InputDevice
MonitorMode monitorMode = MonitorMode::automatic
 
MonitorMode defaultMonitorMode = MonitorMode::automatic
 
bool retrospectiveRecordLock = false
 

Detailed Description

A (virtual) audio input device.

There'll be one or more instances of these, each one representing a group of channels from a physical device.

Constructor & Destructor Documentation

◆ WaveInputDevice()

engine::WaveInputDevice::WaveInputDevice ( Engine ,
const WaveDeviceDescription ,
DeviceType   
)

◆ ~WaveInputDevice()

engine::WaveInputDevice::~WaveInputDevice ( )
override

Member Function Documentation

◆ getMergeModes()

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

◆ getRecordFormatNames()

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

◆ resetToDefault()

void engine::WaveInputDevice::resetToDefault ( )

◆ setEnabled()

void engine::WaveInputDevice::setEnabled ( bool  )
override

◆ getDeviceType()

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

Implements engine::InputDevice.

◆ getDeviceTypeDescription()

juce::String engine::WaveInputDevice::getDeviceTypeDescription ( ) const
override

◆ createInstance()

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

Creates an instance to use for a given playback context.

Implements engine::InputDevice.

◆ setRecordAdjustment()

void engine::WaveInputDevice::setRecordAdjustment ( TimeDuration  )

◆ getRecordAdjustment()

TimeDuration engine::WaveInputDevice::getRecordAdjustment ( ) const

◆ setRecordAdjustmentMs()

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

◆ getRecordAdjustmentMs()

double engine::WaveInputDevice::getRecordAdjustmentMs ( ) const

◆ isStereoPair()

bool engine::WaveInputDevice::isStereoPair ( ) const
Deprecated:
Use getChannels().getNumChannels() == 2 instead.

◆ setStereoPair()

void engine::WaveInputDevice::setStereoPair ( bool  )

◆ createChannelGroupMenu()

juce::PopupMenu engine::WaveInputDevice::createChannelGroupMenu ( bool  includeSetAllChannelsOptions)

◆ getAvailableBitDepths()

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

◆ setBitDepth()

void engine::WaveInputDevice::setBitDepth ( int  )

◆ getBitDepth()

int engine::WaveInputDevice::getBitDepth ( ) const

◆ checkBitDepth()

void engine::WaveInputDevice::checkBitDepth ( )

◆ setInputGainDb()

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

◆ getInputGainDb()

float engine::WaveInputDevice::getInputGainDb ( ) const

◆ setRecordTriggerDb()

void engine::WaveInputDevice::setRecordTriggerDb ( float  )

◆ getRecordTriggerDb()

float engine::WaveInputDevice::getRecordTriggerDb ( ) const

◆ setMeterGateClosed()

void engine::WaveInputDevice::setMeterGateClosed ( bool  )

Closes or opens the input meter gate.

When closed, the level meter is suppressed until the input level exceeds the Record Trigger Level, at which point the gate opens automatically and stays open until closed again. This lets the user audition the trigger threshold without actually recording. Also closed automatically when recording starts on a context whose trigger level is meaningful.

◆ isMeterGateClosed()

bool engine::WaveInputDevice::isMeterGateClosed ( ) const
noexcept

◆ isAnyRecordingActive()

bool engine::WaveInputDevice::isAnyRecordingActive ( ) const

True if any of this device's instances currently has an active recording context.

Safe to call from the message thread.

◆ getFilenameMask()

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

◆ setFilenameMask()

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

◆ setFilenameMaskToDefault()

void engine::WaveInputDevice::setFilenameMaskToDefault ( )

◆ setOutputFormat()

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

◆ getOutputFormat()

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

◆ setMergeMode()

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

◆ getMergeMode()

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

◆ getChannels()

const ChannelConfiguration & engine::WaveInputDevice::getChannels ( ) const
noexcept

◆ getChannelSet()

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

◆ setChannelConfiguration()

void engine::WaveInputDevice::setChannelConfiguration ( const ChannelConfiguration &  )

Updates the channel configuration for track devices.

Call this before recording to match the source track's channel layout.

◆ masterTimeUpdate()

void 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 engine::InputDevice.

◆ consumeNextAudioBlock()

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

◆ getRetrospectiveRecordBuffer()

RetrospectiveRecordBuffer * engine::WaveInputDevice::getRetrospectiveRecordBuffer ( )

◆ updateRetrospectiveBufferLength()

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

Implements engine::InputDevice.

◆ openDevice()

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

◆ closeDevice()

void engine::WaveInputDevice::closeDevice ( )
protected

Member Data Documentation

◆ deviceDescription

WaveDeviceDescription engine::WaveInputDevice::deviceDescription

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