Async
0.18.0
|
This class is used to select one of many audio streams. More...
#include <AsyncAudioSelector.h>
Public Member Functions | |
AudioSelector (void) | |
Default constuctor. | |
~AudioSelector (void) | |
Destructor. | |
void | addSource (AudioSource *source) |
Add an audio source to the selector. | |
void | removeSource (AudioSource *source) |
Remove a previously added audio source from the selector. | |
void | setSelectionPrio (AudioSource *source, int prio) |
Set the prio to be used for selection. | |
void | enableAutoSelect (AudioSource *source, int prio) |
Enable autoselection on the given source. | |
void | disableAutoSelect (AudioSource *source) |
Disable autoselection on the given source. | |
bool | autoSelectEnabled (AudioSource *source) |
Find out if auto select is enabled or not for the given source. | |
void | selectSource (AudioSource *source) |
Select one of the previously added audio sources. | |
![]() | |
AudioSource (void) | |
Default constuctor. | |
virtual | ~AudioSource (void) |
Destructor. | |
bool | registerSink (AudioSink *sink, bool managed=false) |
Register an audio sink to provide samples to. | |
void | unregisterSink (void) |
Unregister the previously registered audio sink. | |
bool | isRegistered (void) const |
Check if an audio sink has been registered. | |
AudioSink * | sink (void) const |
Get the registered audio sink. | |
bool | sinkManaged (void) const |
Check if the sink is managed or not. | |
void | handleAllSamplesFlushed (void) |
The registered sink has flushed all samples. | |
virtual void | resumeOutput (void) |
Resume audio output to the sink. | |
Friends | |
class | Branch |
Additional Inherited Members | |
![]() | |
virtual void | allSamplesFlushed (void) |
The registered sink has flushed all samples. | |
int | sinkWriteSamples (const float *samples, int len) |
void | sinkFlushSamples (void) |
bool | setHandler (AudioSource *handler) |
Setup another source to handle the outgoing audio. | |
AudioSource * | handler (void) const |
void | clearHandler (void) |
Clear a handler that was previously setup with setHandler. | |
This class is used to select one of many audio streams.
This class is used to select one of many incoming audio streams. Incoming samples on non-selected branches will be thrown away.
Definition at line 114 of file AsyncAudioSelector.h.
Async::AudioSelector::AudioSelector | ( | void | ) |
Default constuctor.
Async::AudioSelector::~AudioSelector | ( | void | ) |
Destructor.
void Async::AudioSelector::addSource | ( | AudioSource * | source | ) |
Add an audio source to the selector.
source | The audio source to add |
bool Async::AudioSelector::autoSelectEnabled | ( | AudioSource * | source | ) |
Find out if auto select is enabled or not for the given source.
source | The audio source |
void Async::AudioSelector::disableAutoSelect | ( | AudioSource * | source | ) |
Disable autoselection on the given source.
source | The audio source |
void Async::AudioSelector::enableAutoSelect | ( | AudioSource * | source, |
int | prio | ||
) |
Enable autoselection on the given source.
source | The audio source |
prio | The priority to set. Higher numbers give higher priority. |
void Async::AudioSelector::removeSource | ( | AudioSource * | source | ) |
Remove a previously added audio source from the selector.
source | The audio source to remove |
void Async::AudioSelector::selectSource | ( | AudioSource * | source | ) |
Select one of the previously added audio sources.
source | The audio source to select. 0 = none selected. |
void Async::AudioSelector::setSelectionPrio | ( | AudioSource * | source, |
int | prio | ||
) |
Set the prio to be used for selection.
source | The audio source |
prio | The priority to set. Higher numbers give higher priority. |
|
friend |
Definition at line 188 of file AsyncAudioSelector.h.