summaryrefslogtreecommitdiffstats
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>2010-09-07 15:12:12 +0530
commit126e1336b214dacda511f3dbf5a463aaaa1f10ee (patch)
treedb3c7949a8dd56932e167410a7d06372a475f3dc /src/modules/echo-cancel/echo-cancel.h
parent21001f49a4bd9dd3adbba4cb4edf41bcda656706 (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);