stream: use latency of minreq/2

Because we don't buffer tlength on the server side, we need to use
half of the minreq as headroom in the server.
This commit is contained in:
Wim Taymans 2018-10-09 16:37:49 +02:00
parent 1509b51966
commit 0870fc8673

View file

@ -849,7 +849,7 @@ static int create_stream(pa_stream_direction_t direction,
props = (struct pw_properties *) pw_stream_get_properties(s->stream);
pw_properties_setf(props, "node.latency", "%u/%u",
s->buffer_attr.minreq / stride, sample_rate);
(s->buffer_attr.minreq / 2) / stride, sample_rate);
pw_properties_set(props, PW_NODE_PROP_MEDIA, "Audio");
pw_properties_set(props, PW_NODE_PROP_CATEGORY,
direction == PA_STREAM_PLAYBACK ?