From 4a1971a5351d49d3ff7fa33f386b579f558c2fd0 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Tue, 22 Apr 2008 02:46:19 +0000 Subject: if no latency was configure for a sink/source, fill in the max latency automatically git-svn-id: file:///home/lennart/svn/public/pulseaudio/branches/glitch-free@2295 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/sink.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/pulsecore/sink.c') diff --git a/src/pulsecore/sink.c b/src/pulsecore/sink.c index e88e7d2b..452dab79 100644 --- a/src/pulsecore/sink.c +++ b/src/pulsecore/sink.c @@ -1298,6 +1298,9 @@ pa_usec_t pa_sink_get_requested_latency(pa_sink *s) { if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) < 0) return 0; + if (usec == (pa_usec_t) -1) + usec = s->max_latency; + return usec; } -- cgit