echo-cancel: Enable different sample specs for rec and out stream
authorStefan Huber <s.huber@bct-electronic.com>
Mon, 18 Feb 2013 15:31:03 +0000 (16:31 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 18 Feb 2013 17:16:40 +0000 (19:16 +0200)
commit163430f05bc763a77d510758781cea57ef919ad6
tree10bcc9514153379e868d80e26b84d78c9d7990b9
parent17b3cb954b179392e80b0a46d8f2ba4693aec386
echo-cancel: Enable different sample specs for rec and out stream

Enable advanced AEC methods to use different specs (i.e., number of
channels) for rec and out stream. A typical application is beam forming
resp. multi-channel AEC, which takes multiple record channels to produce
an echo-canceled output stream.
This commit alters the EC API as follows: the EC's init() used to get
source and sink's sample spec/channel map. The new interface renamed
source to rec and sink to play and additionally passes sample spec and
channel map of the out stream. The new parameter names of init()
{rec,play,out}_{ss,map} are more intuitive and also resemble to the
parameter names known from run(). Both rec_{ss,map} and out_{ss,map} are
initialized as we knew it from source_{ss,map} before being passed to
init(). The previous EC implementations only require trivial changes,
i.e., setting rec_{ss,map} to out_{ss,map} at the end of init() in case
that out_{ss,map} is modified in init().
src/modules/echo-cancel/adrian.c
src/modules/echo-cancel/echo-cancel.h
src/modules/echo-cancel/module-echo-cancel.c
src/modules/echo-cancel/null.c
src/modules/echo-cancel/speex.c
src/modules/echo-cancel/webrtc.cc