summaryrefslogtreecommitdiffstats
path: root/src/modules
diff options
context:
space:
mode:
authorBart Cerneels <bart.cerneels@kde.org>2011-05-28 07:56:00 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-28 07:56:00 +0530
commit4fd3efa46b33726d489af933e709289d20ed5ea0 (patch)
tree3ae305a302df72d8d636034fc20ae5a9b01468a7 /src/modules
parent0ecf51119a349e51daeea0437eba9a14d69ce533 (diff)
echo-cancel: Speex preprocessor has to run *after* the AEC.
This is how it is expected to be run.
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/echo-cancel/module-echo-cancel.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index e83839a9..90577d4c 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -726,12 +726,13 @@ static void source_output_push_cb(pa_source_output *o, const pa_memchunk *chunk)
fwrite(pdata, 1, u->blocksize, u->played_file);
}
- if (u->ec->pp_state)
- speex_preprocess_run(u->ec->pp_state, (spx_int16_t *) rdata);
-
/* perform echo cancelation */
u->ec->run(u->ec, rdata, pdata, cdata);
+ /* preprecessor is run after AEC. This is not a mistake! */
+ if (u->ec->pp_state)
+ speex_preprocess_run(u->ec->pp_state, (spx_int16_t *) cdata);
+
if (u->save_aec) {
if (u->canceled_file)
fwrite(cdata, 1, u->blocksize, u->canceled_file);