#include <AsyncAudioPacer.h>
Definition at line 115 of file AsyncAudioPacer.h.
Async::AudioPacer::AudioPacer | ( | int | sample_rate, | |
int | block_size, | |||
int | prebuf_time | |||
) |
Constuctor.
sample_rate | The sample rate of the incoming samples | |
block_size | The size of the audio blocks | |
prebuf_time | The time (ms) to wait before starting to send audio |
Async::AudioPacer::~AudioPacer | ( | void | ) |
Destructor.
virtual int Async::AudioPacer::writeSamples | ( | const float * | samples, | |
int | count | |||
) | [virtual] |
Write samples into this audio sink.
samples | The buffer containing the samples | |
count | The number of samples in the buffer |
Reimplemented from Async::AudioSink.
virtual void Async::AudioPacer::flushSamples | ( | void | ) | [virtual] |
Tell the sink to flush the previously written samples.
This function is used to tell the sink to flush previously written samples. When done flushing, the sink should call the sourceAllSamplesFlushed function. This function is normally only called from a connected source object.
Reimplemented from Async::AudioSink.
virtual void Async::AudioPacer::resumeOutput | ( | void | ) | [virtual] |
Resume audio output to the sink.
This function will be called when the registered audio sink is ready to accept more samples. This function is normally only called from a connected sink object.
Reimplemented from Async::AudioSource.
virtual void Async::AudioPacer::allSamplesFlushed | ( | void | ) | [protected, virtual] |
The registered sink has flushed all samples.
This function will be called when all samples have been flushed in the registered sink. If it is not reimplemented, a handler must be set that handle the function call. This function is normally only called from a connected sink object.
Reimplemented from Async::AudioSource.