diff options
author | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2010-09-07 14:55:38 +0530 |
---|---|---|
committer | Arun Raghavan <arun.raghavan@collabora.co.uk> | 2011-03-28 14:41:00 +0530 |
commit | b6b8a7b7a7f4f8badd39ebb4ee2be1c11ff1a204 (patch) | |
tree | 6a8a55197b911e23e54bbfbc755f2f9eb440c66a /src/modules/echo-cancel/echo-cancel.h | |
parent | 4a9fa8cc7ff0963fbf794a0018445604f69721e7 (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.h | 9 |
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); |