diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2010-09-07 13:43:58 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-03-28 14:41:00 +0530 |
commit | 47e4dd1ec43298f4d5b8165b772b07f95589966e (patch) | |
tree | 71a293a4c4744c9cb3a61f1bdf4246ea716e7752 /src/modules/echo-cancel/module-echo-cancel.c | |
parent | c975dfa5a532b5bb152128c694094b75a862a540 (diff) |
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).
Diffstat (limited to 'src/modules/echo-cancel/module-echo-cancel.c')
-rw-r--r-- | src/modules/echo-cancel/module-echo-cancel.c | 8 |
1 files changed, 8 insertions, 0 deletions
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) |