[pulseaudio-discuss] [PATCH] loopback: Fix the obviously-wrong "buffer+=buffer" logic

Alexander E. Patrakov patrakov at gmail.com
Sun Feb 22 00:15:29 PST 2015


Extracted from the yet-unsplit patch by Georg Chini with the subject
"[PATCH v4] Make module loopback honor requested latency".
---
 src/modules/module-loopback.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

No Signed-off-by line, because the original patch did not have one.

diff --git a/src/modules/module-loopback.c b/src/modules/module-loopback.c
index 3b0d68d..0af3937 100644
--- a/src/modules/module-loopback.c
+++ b/src/modules/module-loopback.c
@@ -186,7 +186,7 @@ static void adjust_rates(struct userdata *u) {
     if (u->latency_snapshot.recv_counter <= u->latency_snapshot.send_counter)
         buffer += (size_t) (u->latency_snapshot.send_counter - u->latency_snapshot.recv_counter);
     else
-        buffer += PA_CLIP_SUB(buffer, (size_t) (u->latency_snapshot.recv_counter - u->latency_snapshot.send_counter));
+        buffer = PA_CLIP_SUB(buffer, (size_t) (u->latency_snapshot.recv_counter - u->latency_snapshot.send_counter));
 
     buffer_latency = pa_bytes_to_usec(buffer, &u->sink_input->sample_spec);
 
-- 
2.2.1



More information about the pulseaudio-discuss mailing list