From d8b0c9ab503e39daaca2267c0996d4cf75585f33 Mon Sep 17 00:00:00 2001 From: Georg Chini Date: Mon, 16 May 2022 20:40:09 +0200 Subject: [PATCH] module-tunnel-sink/source-new: Add PA_STREAM_ADJUST_LATENCY flag at stream creation Without the flag, the latency on the remote server will not be configured correctly. Part-of: --- src/modules/module-tunnel-sink-new.c | 2 +- src/modules/module-tunnel-source-new.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modules/module-tunnel-sink-new.c b/src/modules/module-tunnel-sink-new.c index 13ac8c0e8..14fd164cc 100644 --- a/src/modules/module-tunnel-sink-new.c +++ b/src/modules/module-tunnel-sink-new.c @@ -398,7 +398,7 @@ static void on_sink_created(struct userdata *u) { if (pa_stream_connect_playback(u->stream, u->remote_sink_name, &bufferattr, - PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_DONT_MOVE | PA_STREAM_START_CORKED | PA_STREAM_AUTO_TIMING_UPDATE, + PA_STREAM_INTERPOLATE_TIMING | PA_STREAM_DONT_MOVE | PA_STREAM_START_CORKED | PA_STREAM_AUTO_TIMING_UPDATE | PA_STREAM_ADJUST_LATENCY, NULL, NULL) < 0) { pa_log_error("Could not connect stream."); diff --git a/src/modules/module-tunnel-source-new.c b/src/modules/module-tunnel-source-new.c index d8cfdae4c..f6139f930 100644 --- a/src/modules/module-tunnel-source-new.c +++ b/src/modules/module-tunnel-source-new.c @@ -380,7 +380,7 @@ static void on_source_created(struct userdata *u) { if (pa_stream_connect_record(u->stream, u->remote_source_name, &bufferattr, - PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_DONT_MOVE|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_START_CORKED) < 0) { + PA_STREAM_INTERPOLATE_TIMING|PA_STREAM_DONT_MOVE|PA_STREAM_AUTO_TIMING_UPDATE|PA_STREAM_START_CORKED|PA_STREAM_ADJUST_LATENCY) < 0) { pa_log_debug("Could not create stream: %s", pa_strerror(pa_context_errno(u->context))); u->thread_mainloop_api->quit(u->thread_mainloop_api, TUNNEL_THREAD_FAILED_MAINLOOP); }