Async::AudioSource Class Reference

The base class for an audio source. More...

#include <AsyncAudioSource.h>

Inheritance diagram for Async::AudioSource:
Async::AudioDebugger Async::AudioDecoder Async::AudioDelayLine Async::AudioFifo Async::AudioIO Async::AudioMixer Async::AudioPacer Async::AudioPassthrough Async::AudioProcessor Async::AudioSelector Async::AudioValve

List of all members.

Public Member Functions

Protected Member Functions


Detailed Description

The base class for an audio source.

Author:
Tobias Blomberg
Date:
2005-04-17

This is the base class for an audio source. An audio source is a class that can produce audio.

Examples:

AsyncAudioIO_demo.cpp.

Definition at line 114 of file AsyncAudioSource.h.


Constructor & Destructor Documentation

Async::AudioSource::AudioSource ( void   )  [inline]

Default constuctor.

Definition at line 120 of file AsyncAudioSource.h.

virtual Async::AudioSource::~AudioSource ( void   )  [virtual]

Destructor.


Member Function Documentation

virtual void Async::AudioSource::allSamplesFlushed ( void   )  [inline, protected, virtual]

The registered sink has flushed all samples.

This function should be implemented by the inheriting class. It 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 in Async::AudioDebugger, Async::AudioDecoder, Async::AudioDelayLine, Async::AudioFifo, Async::AudioIO, Async::AudioMixer, Async::AudioPacer, Async::AudioPassthrough, Async::AudioProcessor, Async::AudioStreamStateDetector, and Async::AudioValve.

Examples:
AsyncAudioIO_demo.cpp.

Definition at line 205 of file AsyncAudioSource.h.

References handleAllSamplesFlushed().

Referenced by handleAllSamplesFlushed().

void Async::AudioSource::clearHandler ( void   )  [protected]

Clear a handler that was previously setup with setHandler.

void Async::AudioSource::handleAllSamplesFlushed ( void   )  [inline]

The registered sink has flushed all samples.

This function will be called when all samples have been flushed in the registered sink. This function is normally only called from a connected sink object.

Definition at line 174 of file AsyncAudioSource.h.

References allSamplesFlushed().

Referenced by allSamplesFlushed().

AudioSource* Async::AudioSource::handler ( void   )  const [inline, protected]

Definition at line 252 of file AsyncAudioSource.h.

bool Async::AudioSource::isRegistered ( void   )  const [inline]

Check if an audio sink has been registered.

Returns:
Returns true if there is an audio sink registerd

Definition at line 148 of file AsyncAudioSource.h.

bool Async::AudioSource::registerSink ( AudioSink sink,
bool  managed = false 
)

Register an audio sink to provide samples to.

Parameters:
sink The audio sink to register
managed If true, the registered sink will be destroyed when this object is destroyed.
Returns:
Returns true on success or else false

Referenced by Async::AudioDebugger::AudioDebugger().

virtual void Async::AudioSource::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 in Async::AudioDebugger, Async::AudioDecoder, Async::AudioDelayLine, Async::AudioFifo, Async::AudioIO, Async::AudioMixer, Async::AudioPacer, Async::AudioPassthrough, Async::AudioProcessor, and Async::AudioValve.

Examples:
AsyncAudioIO_demo.cpp.

Definition at line 188 of file AsyncAudioSource.h.

References resumeOutput().

Referenced by resumeOutput().

bool Async::AudioSource::setHandler ( AudioSource handler  )  [protected]

Setup another source to handle the outgoing audio.

Parameters:
handler The source to handle the audio
Returns:
Returns true on success or else false

This function will setup another source to handle outgoing audio. This can be used when an internal object should handle the audio for this object.

AudioSink* Async::AudioSource::sink ( void   )  const [inline]

Get the registered audio sink.

Returns:
Returns the registered audio sink if any registered or else returns 0.

Definition at line 155 of file AsyncAudioSource.h.

Referenced by Async::AudioDebugger::AudioDebugger().

void Async::AudioSource::sinkFlushSamples ( void   )  [protected]
bool Async::AudioSource::sinkManaged ( void   )  const [inline]

Check if the sink is managed or not.

Returns:
Returns true if the sink is managed or false if not

This function is used to find out if the connected sink is managed or not. A managed sink will automatically be deleted when this source object is deleted.

Definition at line 165 of file AsyncAudioSource.h.

int Async::AudioSource::sinkWriteSamples ( const float *  samples,
int  len 
) [protected]
void Async::AudioSource::unregisterSink ( void   ) 

Unregister the previously registered audio sink.


The documentation for this class was generated from the following file:
Generated by  doxygen 1.6.2-20100208