diff options
author | Lennart Poettering <lennart@poettering.net> | 2008-12-24 00:58:34 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2008-12-24 00:58:34 +0100 |
commit | 2ff20ceccb7334b0d491fec119a324cda1045803 (patch) | |
tree | 9dab44ae820f8d21b9ed2e4a5a077c2a168a110f /src/pulsecore/source.c | |
parent | fb4c111d18932ca5643a44ad589a1fff5888260f (diff) |
Rework handling of the PA_SINK_LATENCY/PA_SOURCE_LATENCY flags
Diffstat (limited to 'src/pulsecore/source.c')
-rw-r--r-- | src/pulsecore/source.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/pulsecore/source.c b/src/pulsecore/source.c index 5538ced1..815ec271 100644 --- a/src/pulsecore/source.c +++ b/src/pulsecore/source.c @@ -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; |