Async 1.8.0
Async::AudioDebugger Class Reference

This class is used to debug an audio stream. More...

#include <AsyncAudioDebugger.h>

Inheritance diagram for Async::AudioDebugger:
Async::AudioSink Async::AudioSource

Public Member Functions

 AudioDebugger (Async::AudioSource *src=0, const std::string &name="AudioDebugger")
 Default constuctor.
 
virtual ~AudioDebugger (void)
 Destructor.
 
void setName (std::string debug_name)
 Set the name that is displayed before debug messages.
 
virtual int writeSamples (const float *samples, int count)
 Write samples into this audio sink.
 
virtual void flushSamples (void)
 Tell the sink to flush the previously written samples.
 
virtual void resumeOutput (void)
 Resume audio output to the sink.
 
virtual void allSamplesFlushed (void)
 The registered sink has flushed all samples.
 
- Public Member Functions inherited from Async::AudioSink
 AudioSink (void)
 Default constuctor.
 
virtual ~AudioSink (void)
 Destructor.
 
bool registerSource (AudioSource *source)
 Register an audio source to provide samples to this sink.
 
void unregisterSource (void)
 Unregister the previously registered audio source.
 
bool isRegistered (void) const
 Check if an audio source has been registered.
 
AudioSourcesource (void) const
 Get the registered audio source.
 
- Public Member Functions inherited from Async::AudioSource
 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.
 
AudioSinksink (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.
 

Additional Inherited Members

- Protected Member Functions inherited from Async::AudioSink
void sourceResumeOutput (void)
 Tell the source that we are ready to accept more samples.
 
void sourceAllSamplesFlushed (void)
 Tell the source that all samples have been flushed.
 
bool setHandler (AudioSink *handler)
 Setup another sink to handle the incoming audio.
 
void clearHandler (void)
 Clear a handler that was previously setup with setHandler.
 
AudioSinkhandler (void) const
 
- Protected Member Functions inherited from Async::AudioSource
int sinkWriteSamples (const float *samples, int len)
 
void sinkFlushSamples (void)
 
bool setHandler (AudioSource *handler)
 Setup another source to handle the outgoing audio.
 
AudioSourcehandler (void) const
 
void clearHandler (void)
 Clear a handler that was previously setup with setHandler.
 

Detailed Description

This class is used to debug an audio stream.

Author
Tobias Blomberg / SM0SVX
Date
2007-10-14

This class is used to debug an audio stream. It can be inserted in the flow and it will print out a debug message for each function call between the sink and the source.

Definition at line 119 of file AsyncAudioDebugger.h.

Constructor & Destructor Documentation

◆ AudioDebugger()

Async::AudioDebugger::AudioDebugger ( Async::AudioSource * src = 0,
const std::string & name = "AudioDebugger" )
inline

◆ ~AudioDebugger()

virtual Async::AudioDebugger::~AudioDebugger ( void )
inlinevirtual

Destructor.

Definition at line 145 of file AsyncAudioDebugger.h.

Member Function Documentation

◆ allSamplesFlushed()

virtual void Async::AudioDebugger::allSamplesFlushed ( void )
inlinevirtual

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.

Reimplemented from Async::AudioSource.

Definition at line 237 of file AsyncAudioDebugger.h.

References Async::AudioSink::sourceAllSamplesFlushed().

◆ flushSamples()

virtual void Async::AudioDebugger::flushSamples ( void )
inlinevirtual

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.

Definition at line 211 of file AsyncAudioDebugger.h.

References Async::AudioSource::sinkFlushSamples().

◆ resumeOutput()

virtual void Async::AudioDebugger::resumeOutput ( void )
inlinevirtual

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.

Definition at line 224 of file AsyncAudioDebugger.h.

References Async::AudioSink::sourceResumeOutput().

◆ setName()

void Async::AudioDebugger::setName ( std::string debug_name)
inline

Set the name that is displayed before debug messages.

Parameters
debug_nameThe name to set

Definition at line 151 of file AsyncAudioDebugger.h.

◆ writeSamples()

virtual int Async::AudioDebugger::writeSamples ( const float * samples,
int count )
inlinevirtual

Write samples into this audio sink.

Parameters
samplesThe buffer containing the samples
countThe number of samples in the buffer
Returns
Returns the number of samples that has been taken care of

This function is used to write audio into this audio sink. If it returns 0, no more samples should be written until the resumeOutput function in the source have been called. This function is normally only called from a connected source object.

Reimplemented from Async::AudioSink.

Definition at line 164 of file AsyncAudioDebugger.h.

References Async::AudioSource::sinkWriteSamples().


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