openshot-audio  0.1.6
Classes | Public Member Functions | List of all members
ASIOAudioIODevice Class Reference
Inheritance diagram for ASIOAudioIODevice:
AudioIODevice Timer

Classes

struct  ASIOCallbackFunctions< sizeof(currentASIODev)/sizeof(currentASIODev[0])>
 

Public Member Functions

 ASIOAudioIODevice (ASIOAudioIODeviceType *ownerType, const String &devName, const CLSID clsID, const int slotNumber)
 
 ~ASIOAudioIODevice ()
 
void updateSampleRates ()
 
StringArray getOutputChannelNames () override
 
StringArray getInputChannelNames () override
 
Array< double > getAvailableSampleRates () override
 
Array< intgetAvailableBufferSizes () override
 
int getDefaultBufferSize () override
 
String open (const BigInteger &inputChannels, const BigInteger &outputChannels, double sr, int bufferSizeSamples) override
 
void close () override
 
bool isOpen () override
 
bool isPlaying () override
 
int getCurrentBufferSizeSamples () override
 
double getCurrentSampleRate () override
 
int getCurrentBitDepth () override
 
BigInteger getActiveOutputChannels () const override
 
BigInteger getActiveInputChannels () const override
 
int getOutputLatencyInSamples () override
 
int getInputLatencyInSamples () override
 
void start (AudioIODeviceCallback *callback) override
 
void stop () override
 
String getLastError ()
 
bool hasControlPanel () const
 
bool showControlPanel ()
 
void resetRequest () noexcept
 
void timerCallback () override
 
- Public Member Functions inherited from AudioIODevice
virtual ~AudioIODevice ()
 
const StringgetName () const noexcept
 
const StringgetTypeName () const noexcept
 
virtual bool setAudioPreprocessingEnabled (bool shouldBeEnabled)
 

Additional Inherited Members

- Protected Member Functions inherited from AudioIODevice
 AudioIODevice (const String &deviceName, const String &typeName)
 
- Protected Attributes inherited from AudioIODevice
String name
 
String typeName
 

Constructor & Destructor Documentation

ASIOAudioIODevice::ASIOAudioIODevice ( ASIOAudioIODeviceType ownerType,
const String devName,
const CLSID  clsID,
const int  slotNumber 
)
inline
ASIOAudioIODevice::~ASIOAudioIODevice ( )
inline

Member Function Documentation

void ASIOAudioIODevice::close ( )
inlineoverridevirtual

Closes and releases the device if it's open.

Implements AudioIODevice.

BigInteger ASIOAudioIODevice::getActiveInputChannels ( ) const
inlineoverridevirtual

Returns a mask showing which of the available input channels are currently enabled.

See also
getInputChannelNames

Implements AudioIODevice.

BigInteger ASIOAudioIODevice::getActiveOutputChannels ( ) const
inlineoverridevirtual

Returns a mask showing which of the available output channels are currently enabled.

See also
getOutputChannelNames

Implements AudioIODevice.

Array<int> ASIOAudioIODevice::getAvailableBufferSizes ( )
inlineoverridevirtual

Returns the set of buffer sizes that are available.

See also
getCurrentBufferSizeSamples, getDefaultBufferSize

Implements AudioIODevice.

Array<double> ASIOAudioIODevice::getAvailableSampleRates ( )
inlineoverridevirtual

Returns the set of sample-rates this device supports.

See also
getCurrentSampleRate

Implements AudioIODevice.

int ASIOAudioIODevice::getCurrentBitDepth ( )
inlineoverridevirtual

Returns the device's current physical bit-depth.

If the device isn't actually open, this value doesn't really mean much.

Implements AudioIODevice.

int ASIOAudioIODevice::getCurrentBufferSizeSamples ( )
inlineoverridevirtual

Returns the buffer size that the device is currently using.

If the device isn't actually open, this value doesn't really mean much.

Implements AudioIODevice.

double ASIOAudioIODevice::getCurrentSampleRate ( )
inlineoverridevirtual

Returns the sample rate that the device is currently using.

If the device isn't actually open, this value doesn't really mean much.

Implements AudioIODevice.

int ASIOAudioIODevice::getDefaultBufferSize ( )
inlineoverridevirtual

Returns the default buffer-size to use.

Returns
a number of samples
See also
getAvailableBufferSizes

Implements AudioIODevice.

StringArray ASIOAudioIODevice::getInputChannelNames ( )
inlineoverridevirtual

Returns the names of all the available input channels on this device. To find out which of these are currently in use, call getActiveInputChannels().

Implements AudioIODevice.

int ASIOAudioIODevice::getInputLatencyInSamples ( )
inlineoverridevirtual

Returns the device's input latency.

This is the delay in samples between some audio actually arriving at the soundcard, and the callback getting passed this block of data.

Implements AudioIODevice.

String ASIOAudioIODevice::getLastError ( )
inlinevirtual

Returns the last error that happened if anything went wrong.

Implements AudioIODevice.

StringArray ASIOAudioIODevice::getOutputChannelNames ( )
inlineoverridevirtual

Returns the names of all the available output channels on this device. To find out which of these are currently in use, call getActiveOutputChannels().

Implements AudioIODevice.

int ASIOAudioIODevice::getOutputLatencyInSamples ( )
inlineoverridevirtual

Returns the device's output latency.

This is the delay in samples between a callback getting a block of data, and that data actually getting played.

Implements AudioIODevice.

bool ASIOAudioIODevice::hasControlPanel ( ) const
inlinevirtual

True if this device can show a pop-up control panel for editing its settings.

This is generally just true of ASIO devices. If true, you can call showControlPanel() to display it.

Reimplemented from AudioIODevice.

bool ASIOAudioIODevice::isOpen ( )
inlineoverridevirtual

Returns true if the device is still open.

A device might spontaneously close itself if something goes wrong, so this checks if it's still open.

Implements AudioIODevice.

bool ASIOAudioIODevice::isPlaying ( )
inlineoverridevirtual

Returns true if the device is still calling back.

The device might mysteriously stop, so this checks whether it's still playing.

Implements AudioIODevice.

String ASIOAudioIODevice::open ( const BigInteger inputChannels,
const BigInteger outputChannels,
double  sampleRate,
int  bufferSizeSamples 
)
inlineoverridevirtual

Tries to open the device ready to play.

Parameters
inputChannelsa BigInteger in which a set bit indicates that the corresponding input channel should be enabled
outputChannelsa BigInteger in which a set bit indicates that the corresponding output channel should be enabled
sampleRatethe sample rate to try to use - to find out which rates are available, see getAvailableSampleRates()
bufferSizeSamplesthe size of i/o buffer to use - to find out the available buffer sizes, see getAvailableBufferSizes()
Returns
an error description if there's a problem, or an empty string if it succeeds in opening the device
See also
close

Implements AudioIODevice.

void ASIOAudioIODevice::resetRequest ( )
inlinenoexcept
bool ASIOAudioIODevice::showControlPanel ( )
inlinevirtual

Shows a device-specific control panel if there is one.

This should only be called for devices which return true from hasControlPanel().

Reimplemented from AudioIODevice.

void ASIOAudioIODevice::start ( AudioIODeviceCallback callback)
inlineoverridevirtual

Starts the device actually playing.

This must be called after the device has been opened.

Parameters
callbackthe callback to use for streaming the data.
See also
AudioIODeviceCallback, open

Implements AudioIODevice.

void ASIOAudioIODevice::stop ( )
inlineoverridevirtual

Stops the device playing.

Once a device has been started, this will stop it. Any pending calls to the callback class will be flushed before this method returns.

Implements AudioIODevice.

void ASIOAudioIODevice::timerCallback ( )
inlineoverridevirtual

The user-defined callback routine that actually gets called periodically.

It's perfectly ok to call startTimer() or stopTimer() from within this callback to change the subsequent intervals.

Implements Timer.

void ASIOAudioIODevice::updateSampleRates ( )
inline

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