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;
The base class for an audio processor class.
An audio pipe class for amplification/attenuation of an audio stream.
AudioAmp(void)
Default constuctor.
float gain(void) const
Read the gain.
~AudioAmp(void)
Destructor.
void processSamples(float *dest, const float *src, int count)
Process incoming samples and put them into the output buffer.
void setGain(float gain_db)
Set the gain to use.
The base class for an audio processor.
Namespace for the asynchronous programming classes.