summaryrefslogtreecommitdiffstats
path: root/src/modules/echo-cancel/echo-cancel.h
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/echo-cancel.h
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/echo-cancel.h')
-rw-r--r--src/modules/echo-cancel/echo-cancel.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/modules/echo-cancel/echo-cancel.h b/src/modules/echo-cancel/echo-cancel.h
index 205c4d14..65e0e240 100644
--- a/src/modules/echo-cancel/echo-cancel.h
+++ b/src/modules/echo-cancel/echo-cancel.h
@@ -28,6 +28,7 @@
#include <pulsecore/macro.h>
#include <speex/speex_echo.h>
+#include "adrian.h"
/* Common data structures */
@@ -39,6 +40,10 @@ struct pa_echo_canceller_params {
uint32_t blocksize;
SpeexEchoState *state;
} speex;
+ struct {
+ uint32_t blocksize;
+ AEC *aec;
+ } adrian;
/* each canceller-specific structure goes here */
} priv;
};
@@ -67,3 +72,12 @@ pa_bool_t pa_speex_ec_init(pa_echo_canceller *ec,
void pa_speex_ec_run(pa_echo_canceller *ec, uint8_t *rec, uint8_t *play, uint8_t *out);
void pa_speex_ec_done(pa_echo_canceller *ec);
uint32_t pa_speex_ec_get_block_size(pa_echo_canceller *ec);
+
+/* Adrian Andre's echo canceller */
+pa_bool_t pa_adrian_ec_init(pa_echo_canceller *ec,
+ pa_sample_spec *source_ss, pa_channel_map *source_map,
+ pa_sample_spec *sink_ss, pa_channel_map *sink_map,
+ const char *args);
+void pa_adrian_ec_run(pa_echo_canceller *ec, uint8_t *rec, uint8_t *play, uint8_t *out);
+void pa_adrian_ec_done(pa_echo_canceller *ec);
+uint32_t pa_adrian_ec_get_block_size(pa_echo_canceller *ec);