diff options
-rw-r--r-- | src/polyp/simple.c | 4 | ||||
-rw-r--r-- | src/polyp/simple.h | 2 | ||||
-rw-r--r-- | src/tests/pacat-simple.c | 4 |
3 files changed, 4 insertions, 6 deletions
diff --git a/src/polyp/simple.c b/src/polyp/simple.c index 84c46bf1..9c2c908c 100644 --- a/src/polyp/simple.c +++ b/src/polyp/simple.c @@ -423,14 +423,12 @@ unlock_and_fail: 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 (;;) { diff --git a/src/polyp/simple.h b/src/polyp/simple.h index bf3cc330..b97e844b 100644 --- a/src/polyp/simple.h +++ b/src/polyp/simple.h @@ -136,7 +136,7 @@ int pa_simple_drain(pa_simple *s, int *error); 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); diff --git a/src/tests/pacat-simple.c b/src/tests/pacat-simple.c index 544c31e3..9d8cc921 100644 --- a/src/tests/pacat-simple.c +++ b/src/tests/pacat-simple.c @@ -78,8 +78,8 @@ int main(PA_GCC_UNUSED int argc, char*argv[]) { #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; } |