From f01c44ed532756e0fedc11bb285413700e67fe19 Mon Sep 17 00:00:00 2001 From: Geoffrey Merck Date: Wed, 29 Jan 2020 20:02:03 +0100 Subject: [PATCH] Add comments --- ambed/cagc.cpp | 6 ++++++ ambed/cagc.h | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ambed/cagc.cpp b/ambed/cagc.cpp index 3ac73c4..619a59f 100644 --- a/ambed/cagc.cpp +++ b/ambed/cagc.cpp @@ -48,11 +48,17 @@ CAGC::CAGC(float initialLeveldB) m_Alpha = m_Bandwidth; } +//////////////////////////////////////////////////////////////////////////////////////// +// get + float CAGC::GetGain() { return 20.0f*log10(m_Gain); } +//////////////////////////////////////////////////////////////////////////////////////// +// process + void CAGC::Apply(uint8 * voice, int size) { for (int i = 0; i < size; i+=2) diff --git a/ambed/cagc.h b/ambed/cagc.h index c3b1831..c1547e3 100644 --- a/ambed/cagc.h +++ b/ambed/cagc.h @@ -23,7 +23,7 @@ // ---------------------------------------------------------------------------- // 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 -// 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 #define cagc_h