From 526277c97c8c1e77252d3c67186914789ba55c33 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 7 Sep 2010 13:43:58 +0530 Subject: echo-cancel: Add alternative echo-cancellation implementation This adds Andre Adrian's AEC implementation from his intercom project (http://andreadrian.de/intercom/) as an alternative to the speex echo cancellation routines. Since the implementation was in C++ and not in the form of a library, I have converted the code to C and made a local copy of the implementation. The implementation actually works on floating point data, so we can tweak it to work with both integer and floating point samples (currently we just use S16LE). --- src/modules/echo-cancel/module-echo-cancel.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/modules/echo-cancel/module-echo-cancel.c') diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c index 6a88167b..75f74d34 100644 --- a/src/modules/echo-cancel/module-echo-cancel.c +++ b/src/modules/echo-cancel/module-echo-cancel.c @@ -82,6 +82,7 @@ PA_MODULE_USAGE( /* NOTE: Make sure the enum and ec_table are maintained in the correct order */ enum { PA_ECHO_CANCELLER_SPEEX, + PA_ECHO_CANCELLER_ADRIAN, }; #define DEFAULT_ECHO_CANCELLER PA_ECHO_CANCELLER_SPEEX @@ -94,6 +95,13 @@ static const pa_echo_canceller ec_table[] = { .done = pa_speex_ec_done, .get_block_size = pa_speex_ec_get_block_size, }, + { + /* Adrian Andre's NLMS implementation */ + .init = pa_adrian_ec_init, + .run = pa_adrian_ec_run, + .done = pa_adrian_ec_done, + .get_block_size = pa_adrian_ec_get_block_size, + }, }; #define DEFAULT_ADJUST_TIME_USEC (1*PA_USEC_PER_SEC) -- cgit