]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
tweak agc
authorAnthony Minessale <anthm@freeswitch.org>
Fri, 18 Feb 2011 00:28:05 +0000 (18:28 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Fri, 18 Feb 2011 00:28:05 +0000 (18:28 -0600)
src/mod/applications/mod_conference/mod_conference.c

index 8c9530a38d6371372a9e038a143fbdc4ec354ef4..8ef72a4d4de613b6fb4279c0d6d2d428abb8c187 100644 (file)
@@ -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)) {