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: <https://gitlab.freedesktop.org/pulseaudio/pulseaudio/-/merge_requests/699>
This commit is contained in:
Georg Chini 2022-05-16 20:40:09 +02:00
parent 17eb178f17
commit d8b0c9ab50
2 changed files with 2 additions and 2 deletions

View file

@ -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.");

View file

@ -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);
}