From f9e2058820c2a51994708ad11d1ed8e09b12b8b1 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 16 Sep 2004 00:05:56 +0000 Subject: add input latency measurement add GETOSPACE support to module-oss git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@205 fefdeb5f-60dc-0310-8127-8f9354f1896f --- polyp/source.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'polyp/source.c') diff --git a/polyp/source.c b/polyp/source.c index 2c0caca0..23b8bf8a 100644 --- a/polyp/source.c +++ b/polyp/source.c @@ -60,6 +60,7 @@ struct pa_source* pa_source_new(struct pa_core *core, const char *name, int fail s->outputs = pa_idxset_new(NULL, NULL); s->monitor_of = NULL; + s->get_latency = NULL; s->notify = NULL; s->userdata = NULL; @@ -150,3 +151,13 @@ void pa_source_set_owner(struct pa_source *s, struct pa_module *m) { assert(s); s->owner = m; } + +pa_usec_t pa_source_get_latency(struct pa_source *s) { + assert(s && s->ref >= 1); + + if (!s->get_latency) + return 0; + + return s->get_latency(s); +} + -- cgit