Add comments

This commit is contained in:
Geoffrey Merck 2020-01-29 20:02:03 +01:00
parent fe700f253b
commit f01c44ed53
2 changed files with 7 additions and 1 deletions

View file

@ -48,11 +48,17 @@ CAGC::CAGC(float initialLeveldB)
m_Alpha = m_Bandwidth; m_Alpha = m_Bandwidth;
} }
////////////////////////////////////////////////////////////////////////////////////////
// get
float CAGC::GetGain() float CAGC::GetGain()
{ {
return 20.0f*log10(m_Gain); return 20.0f*log10(m_Gain);
} }
////////////////////////////////////////////////////////////////////////////////////////
// process
void CAGC::Apply(uint8 * voice, int size) void CAGC::Apply(uint8 * voice, int size)
{ {
for (int i = 0; i < size; i+=2) for (int i = 0; i < size; i+=2)

View file

@ -23,7 +23,7 @@
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Geoffrey Merck F4FXL / KC3FRA AGC code largely inspired by Liquid DSP // Geoffrey Merck F4FXL / KC3FRA AGC code largely inspired by Liquid DSP
// Only took the parts we need qnd recoeded it to be close the XLX coding style // Only took the parts we need qnd recoeded it to be close the XLX coding style
// https://github.com/jgaeddert/liquid-dsp/blob/master/src/agc/src/agc.c // https://github.com/jgaeddert/liquid-dsp/blob/master/src/agc/src/agc.c
#ifndef cagc_h #ifndef cagc_h
#define cagc_h #define cagc_h