28 #ifndef ASYNC_AUDIO_DELAY_LINE_INCLUDED 29 #define ASYNC_AUDIO_DELAY_LINE_INCLUDED 153 void mute(
bool do_mute,
int time_ms=0);
163 void clear(
int time_ms=-1);
210 static const int DEFAULT_FADE_TIME = 10;
226 void writeRemainingSamples(
void);
228 inline float currentFadeGain(
void)
235 float gain = fade_gain[fade_pos];
236 fade_pos += fade_dir;
238 if ((fade_dir > 0) && (fade_pos >= fade_len-1))
241 fade_pos = fade_len-1;
243 else if ((fade_dir < 0) && (fade_pos <= 0))
void mute(bool do_mute, int time_ms=0)
Mute audio.
void resumeOutput(void)
Resume audio output to the sink.
~AudioDelayLine(void)
Destructor.
This file contains the base class for an audio source.
int writeSamples(const float *samples, int count)
Write samples into the delay line.
void flushSamples(void)
Tell the sink to flush the previously written samples.
This file contains the base class for an audio sink.
void clear(int time_ms=-1)
Clear samples in the delay line.
The base class for an audio sink.
Namespace for the asynchronous programming classes.
void setFadeTime(int time_ms)
Set the fade in/out time when muting and clearing.
The base class for an audio source.
void allSamplesFlushed(void)
The registered sink has flushed all samples.
AudioDelayLine(int length_ms)
Constuctor.
This class implements an audio delay line.