27 #ifndef ASYNC_AUDIO_AMP_INCLUDED 28 #define ASYNC_AUDIO_AMP_INCLUDED 129 void setGain(
float gain_db) { m_gain = powf(10, gain_db / 20); }
135 float gain(
void)
const {
return 20 * log10(m_gain); }
141 for (
int i=0; i<count; ++i)
143 dest[i] = src[i] * m_gain;
An audio pipe class for amplification/attenuation of an audio stream.
~AudioAmp(void)
Destructor.
The base class for an audio processor.
float gain(void) const
Read the gain.
void setGain(float gain_db)
Set the gain to use.
AudioAmp(void)
Default constuctor.
Namespace for the asynchronous programming classes.
void processSamples(float *dest, const float *src, int count)
Process incoming samples and put them into the output buffer.
The base class for an audio processor class.