The base class for an audio processor. More...
#include <AsyncAudioProcessor.h>
The base class for an audio processor.
This class is the base class for an audio processor. An audio processor is a class that is both an audio sink and source. It receives samples, process them in some way and send them further down the chain.
Definition at line 117 of file AsyncAudioProcessor.h.
Async::AudioProcessor::AudioProcessor | ( | void | ) |
Default constuctor.
virtual Async::AudioProcessor::~AudioProcessor | ( | void | ) | [virtual] |
Destructor.
void Async::AudioProcessor::allSamplesFlushed | ( | void | ) | [virtual] |
All samples have been flushed by the sink.
Reimplemented from Async::AudioSource.
void Async::AudioProcessor::flushSamples | ( | void | ) | [virtual] |
Order a flush of all samples.
Reimplemented from Async::AudioSink.
virtual void Async::AudioProcessor::processSamples | ( | float * | dest, | |
const float * | src, | |||
int | count | |||
) | [protected, pure virtual] |
Process incoming samples and put them into the output buffer.
dest | Destination buffer | |
src | Source buffer | |
count | Number of samples in the source buffer |
This function should be reimplemented by the inheriting class to do the actual processing of the incoming samples. All samples must be processed, otherwise they are lost and the output buffer will contain garbage.
Implemented in Async::AudioAmp, Async::AudioClipper, Async::AudioCompressor, Async::AudioDecimator, Async::AudioFilter, and Async::AudioInterpolator.
void Async::AudioProcessor::resumeOutput | ( | void | ) | [virtual] |
Resume output to the sink if previously stopped.
Reimplemented from Async::AudioSource.
void Async::AudioProcessor::setInputOutputSampleRate | ( | int | input_rate, | |
int | output_rate | |||
) | [protected] |
Set the input and output sample rates.
input_rate | The input sample rate | |
output_rate | The output sample rate |
int Async::AudioProcessor::writeSamples | ( | const float * | samples, | |
int | len | |||
) | [virtual] |
Write audio to the filter.
samples | The buffer containing the samples | |
len | The number of samples in the buffer |
Reimplemented from Async::AudioSink.