mirror of
https://github.com/ShaYmez/xlxd.git
synced 2025-09-06 07:07:48 -04:00
Add AGC clamping constant, turn AGC on, reduce target energy
This commit is contained in:
parent
ee1b97a165
commit
b9d0c6e532
@ -38,11 +38,13 @@ CAGC::CAGC(float initialLeveldB)
|
|||||||
// set internal gain appropriately
|
// set internal gain appropriately
|
||||||
m_Gain = pow(10.0f, initialLeveldB/20.0f);
|
m_Gain = pow(10.0f, initialLeveldB/20.0f);
|
||||||
//+- 10dB Margin, TODO Move margin to constant
|
//+- 10dB Margin, TODO Move margin to constant
|
||||||
m_GainMax = pow(10.0f, (initialLeveldB + 10.0f)/20.0f);
|
m_GainMax = pow(10.0f, (initialLeveldB + AGC_CLAMPING)/20.0f);
|
||||||
m_GainMin = pow(10.0f, (initialLeveldB - 10.0f)/20.0f);
|
m_GainMin = pow(10.0f, (initialLeveldB - AGC_CLAMPING)/20.0f);
|
||||||
|
|
||||||
m_EnergyPrime = 1.0f;
|
m_EnergyPrime = 1.0f;
|
||||||
m_targetEnergy = 32767.0f;//TODO : Move to parameter ?
|
|
||||||
|
// We do not target full scale to avoid stauration
|
||||||
|
m_targetEnergy = 32767.0f/2.0f;//TODO : Move to parameter ?
|
||||||
|
|
||||||
m_Bandwidth = 1e-2f;//TODO : Move to parameter ?
|
m_Bandwidth = 1e-2f;//TODO : Move to parameter ?
|
||||||
m_Alpha = m_Bandwidth;
|
m_Alpha = m_Bandwidth;
|
||||||
|
@ -68,11 +68,12 @@
|
|||||||
#define CODEC_AMBE2PLUS 2
|
#define CODEC_AMBE2PLUS 2
|
||||||
|
|
||||||
// Transcoding speech gains
|
// Transcoding speech gains
|
||||||
#define CODECGAIN_AMBEPLUS -10 // in dB
|
#define CODECGAIN_AMBEPLUS -16 // in dB
|
||||||
#define CODECGAIN_AMBE2PLUS +10 // in dB
|
#define CODECGAIN_AMBE2PLUS +16 // in dB
|
||||||
|
|
||||||
// Transcoding Tweaks
|
// Transcoding Tweaks
|
||||||
#define USE_AGC 0
|
#define USE_AGC 1
|
||||||
|
#define AGC_CLAMPING 3 //clamps the AGC gain to +- this value
|
||||||
#define USE_BANDPASSFILTER 1
|
#define USE_BANDPASSFILTER 1
|
||||||
|
|
||||||
// Timeouts -----------------------------------------------------
|
// Timeouts -----------------------------------------------------
|
||||||
|
Loading…
x
Reference in New Issue
Block a user