|
Wave Arts VQE
1.00
Voice Quality Enhancement
|
Automatic Gain Control (AGC) More...
#include "EQ.h"Go to the source code of this file.
Classes | |
| struct | AutoGainParam |
| AutoGain parameters. More... | |
| struct | AutoGain |
| AutoGain runtime structure. More... | |
Defines | |
| #define | kAutoGainClipDb -3.0 |
| #define | kAutoGainOKDb -21.0 |
| #define | kAutoGainLowDb -36.0 |
| #define | kAutoGainIncrTime 1.0 |
| #define | kAutoGainDecrTime 0.200 |
| #define | kAutoGainIncr 0.05 |
| #define | kAutoGainIncrThresh 0.20 |
Typedefs | |
| typedef void | AutoGainSetGainFn (void *arg, int isIncr, float incr) |
| Callback to adjust gain. | |
Enumerations | |
| enum | AutoGainLevel { IGNORE_LEVEL, LOW_LEVEL, OK_LEVEL, CLIP_LEVEL, NUM_LEVEL } |
Functions | |
| AutoGain * | AutoGainNew (AutoGainParam *param, AutoGainSetGainFn *fn, void *arg) |
| Create AutoGain object. | |
| void | AutoGainDelete (AutoGain *p) |
| Destructor. | |
| void | AutoGainProcessShort (AutoGain *p, short *input) |
| Process short samples. | |
| void | AutoGainProcessFloat (AutoGain *p, float *input) |
| Process float samples (-1.0 to +1.0) | |
| void | AutoGainProcessPeakVal (AutoGain *p, float peakVal) |
| Process peak value. | |
| void | AutoGainSetThresh (AutoGain *p, float clipDb, float okDb, float lowDb) |
| Set thresholds. | |
| void | AutoGainSetUpdateTimes (AutoGain *p, float incrTimeSec, float decrTimeSec) |
| Set update times. | |
| void | AutoGainReset (AutoGain *p) |
| Reset to initial condition. | |
| void | AutoGainGetDefaultParam (AutoGainParam *param) |
| Get default parameters. | |
Automatic Gain Control (AGC)
| #define kAutoGainClipDb -3.0 |
decrease gain above this
| #define kAutoGainDecrTime 0.200 |
min time between gain decreases
| #define kAutoGainIncr 0.05 |
20 gain steps
| #define kAutoGainIncrThresh 0.20 |
20% of buffers low without ok will increase
| #define kAutoGainIncrTime 1.0 |
min time between gain increases
| #define kAutoGainLowDb -36.0 |
levels below this are ignored
| #define kAutoGainOKDb -21.0 |
increase gain between low and ok
| typedef void AutoGainSetGainFn(void *arg, int isIncr, float incr) |
Callback to adjust gain.
| arg | user specified argument | |
| [in] | isIncr | true if increment, false if decrement gain |
| [in] | incr | increment, typically 0.01 to 0.10 |
The function should never decrease gain to 0 because this can mute! AutoGain never learns the actual volume level, it simply requests that it be raised or lowered by the incr amount specified in the parameters.
| enum AutoGainLevel |
| void AutoGainGetDefaultParam | ( | AutoGainParam * | param | ) |
Get default parameters.
| [out] | param | pointer to parameter object to initialize |
Caller must set up numChan, sampRate and framesPerBuf.
| AutoGain* AutoGainNew | ( | AutoGainParam * | param, |
| AutoGainSetGainFn * | fn, | ||
| void * | arg | ||
| ) |
| void AutoGainProcessFloat | ( | AutoGain * | p, |
| float * | input | ||
| ) |
Process float samples (-1.0 to +1.0)
| p | AutoGain object |
| input | pointer to samples |
| void AutoGainProcessPeakVal | ( | AutoGain * | p, |
| float | peakVal | ||
| ) |
Process peak value.
| p | AutoGain object |
| peakVal | peak value, 1.0 is 0 dBFS |
Internal function to process peak value of buffer.
1.7.5.1