#include <AsyncAudioValve.h>
Definition at line 116 of file AsyncAudioValve.h.
Async::AudioValve::AudioValve | ( | void | ) | [inline, explicit] |
Async::AudioValve::~AudioValve | ( | void | ) | [inline] |
void Async::AudioValve::setOpen | ( | bool | do_open | ) | [inline] |
Open or close the valve.
do_open | If true the valve is open or else it's closed |
Definition at line 142 of file AsyncAudioValve.h.
References Async::AudioSource::sinkFlushSamples(), Async::AudioSink::sourceAllSamplesFlushed(), and Async::AudioSink::sourceResumeOutput().
void Async::AudioValve::setBlockWhenClosed | ( | bool | block_when_closed | ) | [inline] |
Setup audio stream blocking when valve is closed.
block_when_closed | When true, block the incoming audio stream when the valve is closed. When false, incoming audio is thrown away when the valve is closed. |
Definition at line 188 of file AsyncAudioValve.h.
References Async::AudioSink::sourceResumeOutput().
bool Async::AudioValve::isOpen | ( | void | ) | const [inline] |
Check if the valve is open.
Definition at line 208 of file AsyncAudioValve.h.
bool Async::AudioValve::isIdle | ( | void | ) | const [inline] |
Check if the valve is idle.
Definition at line 217 of file AsyncAudioValve.h.
int Async::AudioValve::writeSamples | ( | const float * | samples, | |
int | count | |||
) | [inline, virtual] |
Write samples into the valve.
samples | The buffer containing the samples | |
count | The number of samples in the buffer |
Reimplemented from Async::AudioSink.
Definition at line 233 of file AsyncAudioValve.h.
References Async::AudioSource::sinkWriteSamples().
void Async::AudioValve::flushSamples | ( | void | ) | [inline, virtual] |
Tell the valve to flush the previously written samples.
This function is used to tell the valve to flush previously written samples. When done flushing, the valve will call the allSamplesFlushed function in the connected source object. This function is normally only called from a connected source object.
Reimplemented from Async::AudioSink.
Definition at line 263 of file AsyncAudioValve.h.
References Async::AudioSource::sinkFlushSamples(), and Async::AudioSink::sourceAllSamplesFlushed().
void Async::AudioValve::resumeOutput | ( | void | ) | [inline, virtual] |
Resume audio output to the sink.
This function must be reimplemented by the inheriting class. It 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.
Definition at line 286 of file AsyncAudioValve.h.
References Async::AudioSink::sourceResumeOutput().
virtual void Async::AudioValve::allSamplesFlushed | ( | void | ) | [inline, virtual] |
The registered sink has flushed all samples.
This function must be implemented by the inheriting class. This function will be called when all samples have been flushed in the registered sink.
Reimplemented from Async::AudioSource.
Definition at line 305 of file AsyncAudioValve.h.
References Async::AudioSink::sourceAllSamplesFlushed().