[polypaudio-commits] r939 - in /trunk/src: polyp/simple.c polyp/simple.h tests/pacat-simple.c

svnmailer-noreply at 0pointer.de svnmailer-noreply at 0pointer.de
Sat May 20 07:59:03 PDT 2006


Author: lennart
Date: Sat May 20 16:59:02 2006
New Revision: 939

URL: http://0pointer.de/cgi-bin/viewcvs.cgi?rev=939&root=polypaudio&view=rev
Log:
rename pa_simple_get_playback_latency() to pa_simple_get_latency() and allow its usage on capture streams

Modified:
    trunk/src/polyp/simple.c
    trunk/src/polyp/simple.h
    trunk/src/tests/pacat-simple.c

Modified: trunk/src/polyp/simple.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/simple.c?rev=939&root=polypaudio&r1=938&r2=939&view=diff
==============================================================================
--- trunk/src/polyp/simple.c (original)
+++ trunk/src/polyp/simple.c Sat May 20 16:59:02 2006
@@ -423,14 +423,12 @@
     return -1;
 }
 
-pa_usec_t pa_simple_get_playback_latency(pa_simple *p, int *rerror) {
+pa_usec_t pa_simple_get_latency(pa_simple *p, int *rerror) {
     pa_usec_t t;
     int negative;
     
     assert(p);
     
-    CHECK_VALIDITY_RETURN_ANY(rerror, p->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE, (pa_usec_t) -1);
-
     pa_threaded_mainloop_lock(p->mainloop);
 
     for (;;) {

Modified: trunk/src/polyp/simple.h
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/polyp/simple.h?rev=939&root=polypaudio&r1=938&r2=939&view=diff
==============================================================================
--- trunk/src/polyp/simple.h (original)
+++ trunk/src/polyp/simple.h Sat May 20 16:59:02 2006
@@ -136,7 +136,7 @@
 int pa_simple_read(pa_simple *s, void*data, size_t length, int *error);
 
 /** Return the playback latency. \since 0.5 */
-pa_usec_t pa_simple_get_playback_latency(pa_simple *s, int *error);
+pa_usec_t pa_simple_get_latency(pa_simple *s, int *error);
 
 /** Flush the playback buffer. \since 0.5 */
 int pa_simple_flush(pa_simple *s, int *error);

Modified: trunk/src/tests/pacat-simple.c
URL: http://0pointer.de/cgi-bin/viewcvs.cgi/trunk/src/tests/pacat-simple.c?rev=939&root=polypaudio&r1=938&r2=939&view=diff
==============================================================================
--- trunk/src/tests/pacat-simple.c (original)
+++ trunk/src/tests/pacat-simple.c Sat May 20 16:59:02 2006
@@ -78,8 +78,8 @@
 #if 0
         pa_usec_t latency;
 
-        if ((latency = pa_simple_get_playback_latency(s, &error)) == (pa_usec_t) -1) {
-            fprintf(stderr, __FILE__": pa_simple_get_playback_latency() failed: %s\n", pa_strerror(error));
+        if ((latency = pa_simple_get_latency(s, &error)) == (pa_usec_t) -1) {
+            fprintf(stderr, __FILE__": pa_simple_get_latency() failed: %s\n", pa_strerror(error));
             goto finish;
         }
 




More information about the pulseaudio-commits mailing list