summaryrefslogtreecommitdiff
path: root/mg2ec.h
diff options
context:
space:
mode:
Diffstat (limited to 'mg2ec.h')
-rw-r--r--mg2ec.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/mg2ec.h b/mg2ec.h
index a1d691e..9623152 100644
--- a/mg2ec.h
+++ b/mg2ec.h
@@ -556,6 +556,9 @@ static inline short echo_can_update(struct echo_can_state *ec, short iref, short
#ifndef NO_ECHO_SUPPRESSOR
#ifdef AGGRESSIVE_SUPPRESSOR
+#ifdef AGGRESSIVE_TIMELIMIT
+ if (ec->i_d < AGGRESSIVE_TIMELIMIT ) {
+#endif
if ((ec->HCNTR_d < AGGRESSIVE_HCNTR) && (ec->Ly_i > (ec->Lu_i << 1))) {
for (k=0; k < RESIDUAL_SUPRESSION_PASSES; k++) {
u = u * (ec->Lu_i >> DEFAULT_SIGMA_LU_I) / ((ec->Ly_i >> (DEFAULT_SIGMA_LY_I)) + 1);
@@ -567,7 +570,12 @@ static inline short echo_can_update(struct echo_can_state *ec, short iref, short
++ec->cntr_residualcorrected_frames;
#endif
}
-#else
+#ifdef AGGRESSIVE_TIMELIMIT
+ }
+ else {
+#endif
+#endif
+#if (defined AGGRESSIVE_SUPPRESSOR && defined AGGRESSIVE_TIMELIMIT) || !defined AGGRESSIVE_SUPPRESSOR
if (ec->HCNTR_d == 0) {
if ((ec->Ly_i/(ec->Lu_i + 1)) > DEFAULT_SUPPR_I) {
for (k=0; k < RESIDUAL_SUPRESSION_PASSES; k++) {
@@ -586,6 +594,9 @@ static inline short echo_can_update(struct echo_can_state *ec, short iref, short
}
#endif
}
+#ifdef AGGRESSIVE_TIMELIMIT
+ }
+#endif
#endif
#endif