Avoid double-counting the calculated buffer latency in the else-branch. This has already been submitted as a seperate patch but is included here for completeness. --- src/modules/module-loopback.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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.1.4