29#ifndef ASYNC_AUDIO_STREAM_STATE_DETECTOR_INCLUDED
30#define ASYNC_AUDIO_STREAM_STATE_DETECTOR_INCLUDED
39#include <sigc++/sigc++.h>
137 if (stream_state != STREAM_ACTIVE)
139 stream_state = STREAM_ACTIVE;
155 if (stream_state != STREAM_FLUSHING)
157 stream_state = STREAM_FLUSHING;
172 if (stream_state != STREAM_IDLE)
174 stream_state = STREAM_IDLE;
184 bool isIdle(
void)
const {
return (stream_state == STREAM_IDLE); }
191 bool isActive(
void)
const {
return (stream_state == STREAM_ACTIVE); }
198 bool isFlushing(
void)
const {
return (stream_state == STREAM_FLUSHING); }
214 STREAM_IDLE, STREAM_ACTIVE, STREAM_FLUSHING
217 StreamState stream_state;
This file contains a class that just pass the audio through.
This class just let the audio pass through.
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
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.
A class that just passes the audio through and fires an event when the stream state changes.
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
AudioStreamStateDetector(void)
Default constuctor.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
bool isActive(void) const
Check if the steam is active or not.
bool isIdle(void) const
Check if the steam is idle or not.
virtual ~AudioStreamStateDetector(void)
Destructor.
bool isFlushing(void) const
Check if the steam is flushing or not.
virtual void allSamplesFlushed(void)
The registered sink has flushed all samples.
sigc::signal< void, bool, bool > sigStreamStateChanged
A signal that is emitted when the stream state changes.
Namespace for the asynchronous programming classes.