Async  0.18.0
Public Member Functions | Friends | List of all members
Async::AudioSelector Class Reference

This class is used to select one of many audio streams. More...

#include <AsyncAudioSelector.h>

Inheritance diagram for Async::AudioSelector:
Async::AudioSource

Public Member Functions

 AudioSelector (void)
 Default constuctor. More...
 
 ~AudioSelector (void)
 Destructor. More...
 
void addSource (AudioSource *source)
 Add an audio source to the selector. More...
 
void removeSource (AudioSource *source)
 Remove a previously added audio source from the selector. More...
 
void setSelectionPrio (AudioSource *source, int prio)
 Set the prio to be used for selection. More...
 
void enableAutoSelect (AudioSource *source, int prio)
 Enable autoselection on the given source. More...
 
void disableAutoSelect (AudioSource *source)
 Disable autoselection on the given source. More...
 
bool autoSelectEnabled (AudioSource *source)
 Find out if auto select is enabled or not for the given source. More...
 
void selectSource (AudioSource *source)
 Select one of the previously added audio sources. More...
 
- Public Member Functions inherited from Async::AudioSource
 AudioSource (void)
 Default constuctor. More...
 
virtual ~AudioSource (void)
 Destructor. More...
 
bool registerSink (AudioSink *sink, bool managed=false)
 Register an audio sink to provide samples to. More...
 
void unregisterSink (void)
 Unregister the previously registered audio sink. More...
 
bool isRegistered (void) const
 Check if an audio sink has been registered. More...
 
AudioSinksink (void) const
 Get the registered audio sink. More...
 
bool sinkManaged (void) const
 Check if the sink is managed or not. More...
 
void handleAllSamplesFlushed (void)
 The registered sink has flushed all samples. More...
 
virtual void resumeOutput (void)
 Resume audio output to the sink. More...
 

Friends

class Branch
 

Additional Inherited Members

- Protected Member Functions inherited from Async::AudioSource
virtual void allSamplesFlushed (void)
 The registered sink has flushed all samples. More...
 
int sinkWriteSamples (const float *samples, int len)
 
void sinkFlushSamples (void)
 
bool setHandler (AudioSource *handler)
 Setup another source to handle the outgoing audio. More...
 
AudioSourcehandler (void) const
 
void clearHandler (void)
 Clear a handler that was previously setup with setHandler. More...
 

Detailed Description

This class is used to select one of many audio streams.

Author
Tobias Blomberg / SM0SVX
Date
2006-08-01

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.

Constructor & Destructor Documentation

Async::AudioSelector::AudioSelector ( void  )

Default constuctor.

Async::AudioSelector::~AudioSelector ( void  )

Destructor.

Member Function Documentation

void Async::AudioSelector::addSource ( AudioSource source)

Add an audio source to the selector.

Parameters
sourceThe audio source to add
bool Async::AudioSelector::autoSelectEnabled ( AudioSource source)

Find out if auto select is enabled or not for the given source.

Parameters
sourceThe audio source
Returns
Returns true if auto select is enabled for the given source or else false is returned
void Async::AudioSelector::disableAutoSelect ( AudioSource source)

Disable autoselection on the given source.

Parameters
sourceThe audio source
void Async::AudioSelector::enableAutoSelect ( AudioSource source,
int  prio 
)

Enable autoselection on the given source.

Parameters
sourceThe audio source
prioThe priority to set. Higher numbers give higher priority.
void Async::AudioSelector::removeSource ( AudioSource source)

Remove a previously added audio source from the selector.

Parameters
sourceThe audio source to remove
void Async::AudioSelector::selectSource ( AudioSource source)

Select one of the previously added audio sources.

Parameters
sourceThe audio source to select. 0 = none selected.
void Async::AudioSelector::setSelectionPrio ( AudioSource source,
int  prio 
)

Set the prio to be used for selection.

Parameters
sourceThe audio source
prioThe priority to set. Higher numbers give higher priority.

Friends And Related Function Documentation

friend class Branch
friend

Definition at line 188 of file AsyncAudioSelector.h.


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