[polypaudio-commits] r650 - /trunk/src/polyp/simple.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Thu Apr 6 17:25:19 PDT 2006


Author: lennart
Date: Fri Apr  7 02:25:19 2006
New Revision: 650

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=650&root=polypaudio&view=rev
Log:
update simple API for new latency API

Modified:
    trunk/src/polyp/simple.c

Modified: trunk/src/polyp/simple.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/simple.c?rev=650&root=polypaudio&r1=649&r2=650&view=diff
==============================================================================
--- trunk/src/polyp/simple.c (original)
+++ trunk/src/polyp/simple.c Fri Apr  7 02:25:19 2006
@@ -345,18 +345,19 @@
     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 @@
     }
 
     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;




More information about the pulseaudio-commits mailing list