]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
FS-9958
authorAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jan 2017 16:51:24 +0000 (10:51 -0600)
committerAnthony Minessale <anthm@freeswitch.org>
Thu, 19 Jan 2017 16:51:24 +0000 (10:51 -0600)
src/switch_resample.c

index 4a1bebedfd64c00fb5e9584d7e7f00162530be0a..1338303309f9760e2db13bd64ac72640c6f771b2 100644 (file)
@@ -503,7 +503,7 @@ SWITCH_DECLARE(switch_status_t) switch_agc_feed(switch_agc_t *agc, int16_t *data
                                agc->score_over = 0;
                        }
 
-                       if (agc->score_avg < agc->energy_avg - agc->margin && agc->score_avg > agc->low_energy_point) {
+                       if (agc->score_avg < agc->energy_avg - agc->margin && (agc->vol < 0 || agc->score_avg > agc->low_energy_point)) {
                                agc->score_under++;
                        } else {
                                agc->score_under = 0;