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).
This commit is contained in:
Arun Raghavan 2010-09-07 13:43:58 +05:30
parent 126e1336b2
commit 526277c97c
9 changed files with 802 additions and 1 deletions

View file

@ -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)