28#ifndef AUDIO_DEBUGGER_INCLUDED
29#define AUDIO_DEBUGGER_INCLUDED
126 : name(
"AudioDebugger"), sample_count(0)
134 src->unregisterSink();
187 std::cout << name <<
"::writeSamples: count=" <<
count
188 <<
" ret=" <<
ret <<
" sample_rate=";
191 std::cout << sample_count * 1000 /
diff_ms;
198 std::cout << std::endl;
212 std::cout << name <<
"::flushSamples\n";
225 std::cout << name <<
"::resumeOutput\n";
238 std::cout << name <<
"::allSamplesFlushed\n";
This file contains the base class for an audio sink.
This file contains the base class for an audio source.
This class is used to debug an audio stream.
virtual void resumeOutput(void)
Resume audio output to the sink.
void setName(std::string debug_name)
Set the name that is displayed before debug messages.
virtual ~AudioDebugger(void)
Destructor.
AudioDebugger(Async::AudioSource *src=0)
Default constuctor.
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
The base class for an audio sink.
void sourceAllSamplesFlushed(void)
Tell the source that all samples have been flushed.
bool registerSource(AudioSource *source)
Register an audio source to provide samples to this sink.
void sourceResumeOutput(void)
Tell the source that we are ready to accept more samples.
The base class for an audio source.
bool registerSink(AudioSink *sink, bool managed=false)
Register an audio sink to provide samples to.
AudioSink * sink(void) const
Get the registered audio sink.
void sinkFlushSamples(void)
int sinkWriteSamples(const float *samples, int len)
A class for creating a TCP client connection.
Namespace for the asynchronous programming classes.