From 22b3d34d559635485054e8d4b3f0d7cc28e0abec Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Thu, 17 Feb 2011 18:28:05 -0600 Subject: [PATCH] tweak agc --- .../applications/mod_conference/mod_conference.c | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mod/applications/mod_conference/mod_conference.c b/src/mod/applications/mod_conference/mod_conference.c index 8c9530a38d..8ef72a4d4d 100644 --- a/src/mod/applications/mod_conference/mod_conference.c +++ b/src/mod/applications/mod_conference/mod_conference.c @@ -6390,16 +6390,30 @@ static conference_obj_t *conference_new(char *name, conf_xml_cfg_t cfg, switch_c if (!zstr(auto_gain_level)) { int level = 0; + int energy_level = 100; if (switch_true(auto_gain_level)) { - level = 2000; + level = 650; } else { + char *p; + int tmp = 0; + level = atoi(auto_gain_level); + if ((p = strchr(auto_gain_level, ':'))) { + p++; + if (p) tmp = atoi(p); + if (tmp > 0) { + energy_level = tmp; + } + } } if (level > 0 && level > conference->energy_level) { conference->agc_level = level; } + + conference->agc_energy_level = energy_level; + } if (!zstr(maxmember_sound)) {