]> code.delx.au - pulseaudio/commit
echo-cancel: Do not bypass EC implementation when play stream is empty
authorStefan Huber <s.huber@bct-electronic.com>
Mon, 18 Feb 2013 13:02:31 +0000 (14:02 +0100)
committerTanu Kaskinen <tanuk@iki.fi>
Mon, 18 Feb 2013 14:26:39 +0000 (16:26 +0200)
commit3aefdd995ca2cb13c75bb2b95d99c970172b1e19
tree0575586ffe62fad2629f68a707412d41dff23bb0
parent9b6dced2cb2df31cde66bad57cc5a0b45842ca66
echo-cancel: Do not bypass EC implementation when play stream is empty

When the play stream from the EC sink has not enough data available then
the EC implementation is currently bypassed by directly forwarding the
record bytes to the EC source. Since EC implementations maintain their
own buffers and cause certain latencies, a bypass leads to glitches as
the out stream stream jumps forth and back in time. Furthermore, some
EC implementations may also apply noise reduction or other sound
enhancing techniques, which are therefore bypassed, too.

Fix this by passing silence bytes to the EC implementation if the play
stream runs empty. Hence, this patch keeps the EC implementation running
even if the play stream has no data available.
src/modules/echo-cancel/module-echo-cancel.c