echo-cancel: Try to minimise in-flight chunks in snapshot latency
authorArun Raghavan <arun@arunraghavan.net>
Thu, 9 Mar 2017 04:28:23 +0000 (09:58 +0530)
committerArun Raghavan <arun@arunraghavan.net>
Wed, 29 Mar 2017 05:34:06 +0000 (11:04 +0530)
commit2c2ca1c949553b59c54431ec179b31a697004492
tree3a40a6022e9da745b6961a462c17bbb33d3b79bb
parentf4f01f6833b30841e026febe0d831b7b3489b981
echo-cancel: Try to minimise in-flight chunks in snapshot latency

We don't always know whether the in-flight memory chunks will be
rendered or skipped (if the source is not in RUNNING). This can cause us
to have an erroneous estimate of drift, particularly when the canceller
starts.

To avoid this, we explicitly flush out the send and receive sides of the
message queue of audio chunks going from the sink to the source before
trying to perform a resync.
src/modules/echo-cancel/module-echo-cancel.c