Go to the documentation of this file.
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.
The base class for an audio source.
void resumeOutput(void)
Resume audio output to the sink.
~AudioDelayLine(void)
Destructor.
int writeSamples(const float *samples, int count)
Write samples into the delay line.
The base class for an audio sink.
void clear(int time_ms=-1)
Clear samples in the delay line.
void setFadeTime(int time_ms)
Set the fade in/out time when muting and clearing.
void flushSamples(void)
Tell the sink to flush the previously written samples.
Namespace for the asynchronous programming classes.
This file contains the base class for an audio sink.
AudioDelayLine(int length_ms)
Constuctor.
This file contains the base class for an audio source.
void allSamplesFlushed(void)
The registered sink has flushed all samples.