#include <pulsecore/core.h>
#include <pulsecore/macro.h>
+#ifdef HAVE_SPEEX
#include <speex/speex_echo.h>
#include <speex/speex_preprocess.h>
+#endif
+
#include "adrian.h"
/* Common data structures */
struct pa_echo_canceller_params {
union {
+#ifdef HAVE_SPEEX
struct {
SpeexEchoState *state;
SpeexPreprocessState *pp_state;
} speex;
+#endif
+#ifdef HAVE_ADRIAN_EC
struct {
uint32_t blocksize;
AEC *aec;
} adrian;
+#endif
#ifdef HAVE_WEBRTC
struct {
/* This is a void* so that we don't have to convert this whole file
void *apm;
uint32_t blocksize;
pa_sample_spec sample_spec;
+ pa_bool_t agc;
} webrtc;
#endif
/* each canceller-specific structure goes here */
void pa_echo_canceller_get_capture_volume(pa_echo_canceller *ec, pa_cvolume *v);
void pa_echo_canceller_set_capture_volume(pa_echo_canceller *ec, pa_cvolume *v);
+#ifdef HAVE_SPEEX
/* Speex canceller functions */
pa_bool_t pa_speex_ec_init(pa_core *c, pa_echo_canceller *ec,
pa_sample_spec *source_ss, pa_channel_map *source_map,
uint32_t *blocksize, const char *args);
void pa_speex_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out);
void pa_speex_ec_done(pa_echo_canceller *ec);
+#endif
+#ifdef HAVE_ADRIAN_EC
/* Adrian Andre's echo canceller */
pa_bool_t pa_adrian_ec_init(pa_core *c, pa_echo_canceller *ec,
pa_sample_spec *source_ss, pa_channel_map *source_map,
uint32_t *blocksize, const char *args);
void pa_adrian_ec_run(pa_echo_canceller *ec, const uint8_t *rec, const uint8_t *play, uint8_t *out);
void pa_adrian_ec_done(pa_echo_canceller *ec);
+#endif
#ifdef HAVE_WEBRTC
/* WebRTC canceller functions */