[pulseaudio-commits] Branch 'next' - src/modules

Arun Raghavan arun at kemper.freedesktop.org
Sun May 12 22:36:17 PDT 2013


 src/modules/echo-cancel/module-echo-cancel.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9d825ea84ec1340029a515cdd16ca12e4df3b9de
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Apr 22 15:36:12 2013 +0200

    echo-cancel: Fix send/recv_counter in calc_diff()
    
    send_counter/recv_counter relate to the bytes (play stream) passed
    through the queue, hence the same sample spec must be used
    
    Signed-off-by: Peter Meerwald <p.meerwald at bct-electronic.com>
    Acked-by: Stefan Huber <shuber at sthu.org>

diff --git a/src/modules/echo-cancel/module-echo-cancel.c b/src/modules/echo-cancel/module-echo-cancel.c
index b77dffd..b45a40c 100644
--- a/src/modules/echo-cancel/module-echo-cancel.c
+++ b/src/modules/echo-cancel/module-echo-cancel.c
@@ -312,8 +312,8 @@ static int64_t calc_diff(struct userdata *u, struct snapshot *snapshot) {
     buffer_latency += source_delay + sink_delay;
 
     /* add the latency difference due to samples not yet transferred */
-    send_counter = pa_bytes_to_usec(snapshot->send_counter, &u->sink_input->sample_spec);
-    recv_counter = pa_bytes_to_usec(snapshot->recv_counter, &u->source_output->sample_spec);
+    send_counter = pa_bytes_to_usec(snapshot->send_counter, &u->sink->sample_spec);
+    recv_counter = pa_bytes_to_usec(snapshot->recv_counter, &u->sink->sample_spec);
     if (recv_counter <= send_counter)
         buffer_latency += (int64_t) (send_counter - recv_counter);
     else



More information about the pulseaudio-commits mailing list