From d027a02223a6b47217870155fff426aed700fb83 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Mon, 5 Oct 2020 16:55:08 +0200 Subject: [PATCH] pulse: ask up to tlength bytes pulseaudio does not ask more than this as well. --- pipewire-pulseaudio/src/stream.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/pipewire-pulseaudio/src/stream.c b/pipewire-pulseaudio/src/stream.c index 3b23f87ab..9ca96de18 100644 --- a/pipewire-pulseaudio/src/stream.c +++ b/pipewire-pulseaudio/src/stream.c @@ -438,10 +438,7 @@ static inline uint32_t queued_size(const pa_stream *s, uint64_t elapsed) } static inline uint32_t target_queue(const pa_stream *s) { - if (SPA_FLAG_IS_SET(s->flags, PA_STREAM_ADJUST_LATENCY)) - return s->buffer_attr.tlength; - else - return s->buffer_attr.maxlength; + return s->buffer_attr.tlength; } static inline uint32_t wanted_size(const pa_stream *s, uint32_t queued, uint32_t target) @@ -1393,6 +1390,7 @@ pa_operation* pa_stream_update_timing_info(pa_stream *s, pa_stream_success_cb_t PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->state == PA_STREAM_READY, PA_ERR_BADSTATE); PA_CHECK_VALIDITY_RETURN_NULL(s->context, s->direction != PA_STREAM_UPLOAD, PA_ERR_BADSTATE); + pw_log_debug("stream %p", s); o = pa_operation_new(s->context, s, on_timing_success, sizeof(struct success_ack)); d = o->userdata; d->cb = cb;