summaryrefslogtreecommitdiffstats
path: root/src/modules/echo-cancel/module-echo-cancel.c
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2010-09-07 13:43:58 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2010-09-07 15:12:12 +0530
commit526277c97c8c1e77252d3c67186914789ba55c33 (patch)
treea535e826920ebe1cde10a90ddccc7367ce32dd1f /src/modules/echo-cancel/module-echo-cancel.c
parent126e1336b214dacda511f3dbf5a463aaaa1f10ee (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.c8
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)