From: Anthony Minessale Date: Fri, 18 Feb 2011 00:28:05 +0000 (-0600) Subject: tweak agc X-Git-Tag: v1.2-rc1~187^2~1^2~14 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=22b3d34d559635485054e8d4b3f0d7cc28e0abec;p=thirdparty%2Ffreeswitch.git tweak agc --- 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)) {