summaryrefslogtreecommitdiffstats
path: root/src/polyp
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-04-07 00:25:19 +0000
committerLennart Poettering <lennart@poettering.net>2006-04-07 00:25:19 +0000
commitc0592bb27c28b7b7902a6b780daf89344bc3516d (patch)
tree65a1fa7a770242a1273b66c7ced0b9587d31735a /src/polyp
parent53a0056cdf3467cc98740e61b781935ef0ed5ac4 (diff)
update simple API for new latency API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@650 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polyp')
-rw-r--r--src/polyp/simple.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/polyp/simple.c b/src/polyp/simple.c
index eabcf1ea..2593d5fa 100644
--- a/src/polyp/simple.c
+++ b/src/polyp/simple.c
@@ -345,18 +345,19 @@ int pa_simple_drain(pa_simple *p, int *rerror) {
return p->dead ? -1 : 0;
}
-static void latency_complete(pa_stream *s, const pa_latency_info *l, void *userdata) {
+static void latency_complete(pa_stream *s, int success, void *userdata) {
pa_simple *p = userdata;
assert(s);
assert(p);
- if (!l)
+ if (!success)
p->dead = 1;
else {
int negative = 0;
- p->latency = pa_stream_get_latency(s, l, &negative);
- if (negative)
+ if (pa_stream_get_latency(s, &p->latency, &negative) < 0)
+ p->dead = 1;
+ else if (negative)
p->latency = 0;
}
}
@@ -376,7 +377,7 @@ pa_usec_t pa_simple_get_playback_latency(pa_simple *p, int *rerror) {
}
p->latency = 0;
- if (!(o = pa_stream_get_latency_info(p->stream, latency_complete, p))) {
+ if (!(o = pa_stream_update_latency_info(p->stream, latency_complete, p))) {
if (rerror)
*rerror = pa_context_errno(p->context);
return (pa_usec_t) -1;