[pulseaudio-discuss] [PATCH 1/2] echo-cancel: Fix speex echo state setting

Arun Raghavan arun at arunraghavan.net
Sun Sep 3 05:39:28 UTC 2017


The state should be set even if echo suppression is disabled, which is
not currently the case.
---
 src/modules/echo-cancel/speex.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/echo-cancel/speex.c b/src/modules/echo-cancel/speex.c
index a3ae64673..bbf059fdd 100644
--- a/src/modules/echo-cancel/speex.c
+++ b/src/modules/echo-cancel/speex.c
@@ -128,11 +128,11 @@ static bool pa_speex_ec_preprocessor_init(pa_echo_canceller *ec, pa_sample_spec
                 speex_preprocess_ctl(ec->params.speex.pp_state, SPEEX_PREPROCESS_SET_ECHO_SUPPRESS_ACTIVE,
                                      &echo_suppress_attenuation_active);
             }
-
-            speex_preprocess_ctl(ec->params.speex.pp_state, SPEEX_PREPROCESS_SET_ECHO_STATE,
-                                 ec->params.speex.state);
         }
 
+        speex_preprocess_ctl(ec->params.speex.pp_state, SPEEX_PREPROCESS_SET_ECHO_STATE,
+                             ec->params.speex.state);
+
         pa_log_info("Loaded speex preprocessor with params: agc=%s, denoise=%s, echo_suppress=%s", pa_yes_no(agc),
                     pa_yes_no(denoise), pa_yes_no(echo_suppress));
     } else
-- 
2.13.5



More information about the pulseaudio-discuss mailing list