[PATCH] echo-cancel: fix the obviously-wrong "buffer+=buffer" logic

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Alexander,

> Same bug as in module-loopback, pointed out by Georg Chini in a private
> email.

can you please elaborate? I fail to see the obviousness

p.

> 
> Signed-off-by: Alexander E. Patrakov <patrakov at gmail.com>
> ---
>  src/modules/echo-cancel/module-echo-cancel.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> 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) -
> -- 
> 2.2.1
> 
> _______________________________________________
> pulseaudio-discuss mailing list
> pulseaudio-discuss at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/pulseaudio-discuss
> 

-- 

Peter Meerwald
+43-664-2444418 (mobile)


[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux