From 948a3d042cd2bfa7000aab48c96a8105201df704 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Tue, 7 Sep 2010 14:55:38 +0530 Subject: 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. --- src/modules/echo-cancel/echo-cancel.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/modules/echo-cancel/echo-cancel.h') 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); -- cgit