[pulseaudio-commits] src/modules

Arun Raghavan arun at kemper.freedesktop.org
Wed Feb 25 20:30:38 PST 2015


 src/modules/echo-cancel/module-echo-cancel.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7c223a6565551cb18ef9db8930b0ce4eced7336c
Author: Alexander E. Patrakov <patrakov at gmail.com>
Date:   Sun Feb 22 16:39:14 2015 +0500

    echo-cancel: fix the obviously-wrong "buffer+=buffer" logic
    
    Same bug as in module-loopback, pointed out by Georg Chini in a private
    email.
    
    Signed-off-by: Alexander E. Patrakov <patrakov at gmail.com>

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index b95a965..639cd41 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -315,7 +315,7 @@ static int64_t calc_diff(struct userdata *u, struct snapshot *snapshot) {
     if (recv_counter <= send_counter)
         buffer_latency += (int64_t) (send_counter - recv_counter);
     else
-        buffer_latency += PA_CLIP_SUB(buffer_latency, (int64_t) (recv_counter - send_counter));
+        buffer_latency = PA_CLIP_SUB(buffer_latency, (int64_t) (recv_counter - send_counter));
 
     /* capture and playback are perfectly aligned when diff_time is 0 */
     diff_time = (snapshot->sink_now + snapshot->sink_latency - buffer_latency) -



More information about the pulseaudio-commits mailing list