summaryrefslogtreecommitdiffstats
path: root/src/modules/echo-cancel/echo-cancel.h
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-19 13:29:49 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-05-24 13:51:28 +0530
commit0ecf51119a349e51daeea0437eba9a14d69ce533 (patch)
tree840f50cdfdbcd4ddf8126f2eb4dec40e875a2319 /src/modules/echo-cancel/echo-cancel.h
parent117c7145944fb227703d72dd2f03e88d439c187d (diff)
echo-cancel: Add speex preprocessing
This allows the selective enabling of speex' preprocessing algorithms before running the echo-canceller -- for now this includes automatic gain control, noise suppression and echo suppression. It's all off by default for now, though at some point in the near future we might want to enable at least denoising by default. The denoising works pretty well, though we might want to add a way to tweak the noise-suppression knob that libspeex provides. The AGC option is just a stop-gap -- we need a real AGC mechanism that tweaks the source volume rather than doing this in software. The speex documentation mentions VAD and dereverb, but it appears that these are not complete yet. We don't do all this in a separate module from module-echo-cancel to avoid the overhead of adding another virtual source. It makes more sense to make a separate virtual source module that can be used for cases where preprocessing is useful but AEC is not (for e.g. noise suppression for fan noise in a recording application). Another reason to keep this integrated with the AEC module is that the echo suppression bits use the speex echo canceller state. This does leak some information about the AEC implementation into module-echo-cancel, but this is unavoidable.
Diffstat (limited to 'src/modules/echo-cancel/echo-cancel.h')
-rw-r--r--src/modules/echo-cancel/echo-cancel.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/modules/echo-cancel/echo-cancel.h b/src/modules/echo-cancel/echo-cancel.h
index 5f6adbc1..5f18053c 100644
--- a/src/modules/echo-cancel/echo-cancel.h
+++ b/src/modules/echo-cancel/echo-cancel.h
@@ -29,6 +29,7 @@
#include <pulsecore/macro.h>
#include <speex/speex_echo.h>
+#include <speex/speex_preprocess.h>
#include "adrian.h"
/* Common data structures */
@@ -63,6 +64,11 @@ struct pa_echo_canceller {
void (*done) (pa_echo_canceller *ec);
pa_echo_canceller_params params;
+
+ pa_bool_t agc;
+ pa_bool_t denoise;
+ pa_bool_t echo_suppress;
+ SpeexPreprocessState *pp_state;
};
/* Speex canceller functions */