summaryrefslogtreecommitdiff
path: root/src/modules/echo-cancel/echo-cancel.h
diff options
context:
space:
mode:
authorArun Raghavan <arun.raghavan@collabora.co.uk>2010-09-06 22:23:51 +0530
committerArun Raghavan <arun.raghavan@collabora.co.uk>2011-03-28 14:41:00 +0530
commitc975dfa5a532b5bb152128c694094b75a862a540 (patch)
tree7d9ebc4fab92c846a569d0b91c0759cdcfec62fa /src/modules/echo-cancel/echo-cancel.h
parent668f4e49b6296431a3592e7fc7cc8846f0e7f272 (diff)
echo-cancel: Let AEC module determine source/sink spec
Since the source and sink specification will need to be determined by the AEC algorithm (can it handle multi-channel audio, does it work with a fixed sample rate, etc.), we negotiate these using inout parameters at initialisation time. There is opportunity to make the sink-handling more elegant. Since the sink data isn't used for playback (just processing), we could pass through the data as-is and resample to the required spec before using in the cancellation algorithm. This isn't too important immediately, but would be nice to have.
Diffstat (limited to 'src/modules/echo-cancel/echo-cancel.h')
-rw-r--r--src/modules/echo-cancel/echo-cancel.h12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/modules/echo-cancel/echo-cancel.h b/src/modules/echo-cancel/echo-cancel.h
index 186ce327..205c4d14 100644
--- a/src/modules/echo-cancel/echo-cancel.h
+++ b/src/modules/echo-cancel/echo-cancel.h
@@ -46,7 +46,12 @@ struct pa_echo_canceller_params {
typedef struct pa_echo_canceller pa_echo_canceller;
struct pa_echo_canceller {
- pa_bool_t (*init) (pa_echo_canceller *ec, pa_sample_spec ss, pa_channel_map map, const char *args);
+ pa_bool_t (*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);
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);
@@ -55,7 +60,10 @@ struct pa_echo_canceller {
};
/* Speex canceller functions */
-pa_bool_t pa_speex_ec_init(pa_echo_canceller *ec, pa_sample_spec ss, pa_channel_map map, const char *args);
+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);
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);