Rework handling of the PA_SINK_LATENCY/PA_SOURCE_LATENCY flags

This commit is contained in:
Lennart Poettering 2008-12-24 00:58:34 +01:00
parent fb4c111d18
commit 2ff20ceccb
2 changed files with 11 additions and 3 deletions

View file

@ -501,6 +501,9 @@ pa_usec_t pa_source_get_latency(pa_source *s) {
if (!PA_SOURCE_IS_OPENED(s->state))
return 0;
if (!(s->flags & PA_SOURCE_LATENCY))
return 0;
pa_assert_se(pa_asyncmsgq_send(s->asyncmsgq, PA_MSGOBJECT(s), PA_SOURCE_MESSAGE_GET_LATENCY, &usec, 0, NULL) == 0);
return usec;