mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-05 13:29:57 -05:00
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
This commit is contained in:
parent
69f6bdf155
commit
4a1971a535
2 changed files with 6 additions and 0 deletions
|
|
@ -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)
|
if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SINK_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (usec == (pa_usec_t) -1)
|
||||||
|
usec = s->max_latency;
|
||||||
|
|
||||||
return usec;
|
return usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -754,6 +754,9 @@ pa_usec_t pa_source_get_requested_latency(pa_source *s) {
|
||||||
if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) < 0)
|
if (pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_REQUESTED_LATENCY, &usec, 0, NULL) < 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
if (usec == (pa_usec_t) -1)
|
||||||
|
usec = s->max_latency;
|
||||||
|
|
||||||
return usec;
|
return usec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue