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 14:55:38 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2010-09-07 15:12:12 +0530
commit948a3d042cd2bfa7000aab48c96a8105201df704 (patch)
tree1266e009795656f0f1783a1cc18e1d7704eaf28a /src/modules/echo-cancel/echo-cancel.h
parent33a3bc34c89093b287eeff6a0b6d6134d1b313b7 (diff)
echo-cancel: Make blocksize a module-wide parameter
Since all algorithms will need to specify a block size (the amount of data to be processed together), we make this a common parameter and have the implementation set it at initialisation time.
Diffstat (limited to 'src/modules/echo-cancel/echo-cancel.h')
-rw-r--r--src/modules/echo-cancel/echo-cancel.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/modules/echo-cancel/echo-cancel.h b/src/modules/echo-cancel/echo-cancel.h
index 65e0e240..bf81b1de 100644
--- a/src/modules/echo-cancel/echo-cancel.h
+++ b/src/modules/echo-cancel/echo-cancel.h
@@ -37,7 +37,6 @@ typedef struct pa_echo_canceller_params pa_echo_canceller_params;
struct pa_echo_canceller_params {
union {
struct {
- uint32_t blocksize;
SpeexEchoState *state;
} speex;
struct {
@@ -56,10 +55,10 @@ struct pa_echo_canceller {
pa_channel_map *source_map,
pa_sample_spec *sink_ss,
pa_channel_map *sink_map,
+ uint32_t *blocksize,
const char *args);
void (*run) (pa_echo_canceller *ec, uint8_t *rec, uint8_t *play, uint8_t *out);
void (*done) (pa_echo_canceller *ec);
- uint32_t (*get_block_size) (pa_echo_canceller *ec);
pa_echo_canceller_params params;
};
@@ -68,16 +67,14 @@ struct pa_echo_canceller {
pa_bool_t pa_speex_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);
+ uint32_t *blocksize, const char *args);
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);
+ uint32_t *blocksize, 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);