mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
rename pa_simple_get_playback_latency() to pa_simple_get_latency() and allow its usage on capture streams
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@939 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
acc6552356
commit
cc61b57a32
3 changed files with 4 additions and 6 deletions
|
|
@ -423,14 +423,12 @@ unlock_and_fail:
|
||||||
return -1;
|
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;
|
pa_usec_t t;
|
||||||
int negative;
|
int negative;
|
||||||
|
|
||||||
assert(p);
|
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);
|
pa_threaded_mainloop_lock(p->mainloop);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
|
|
|
||||||
|
|
@ -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);
|
int pa_simple_read(pa_simple *s, void*data, size_t length, int *error);
|
||||||
|
|
||||||
/** Return the playback latency. \since 0.5 */
|
/** 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 */
|
/** Flush the playback buffer. \since 0.5 */
|
||||||
int pa_simple_flush(pa_simple *s, int *error);
|
int pa_simple_flush(pa_simple *s, int *error);
|
||||||
|
|
|
||||||
|
|
@ -78,8 +78,8 @@ int main(PA_GCC_UNUSED int argc, char*argv[]) {
|
||||||
#if 0
|
#if 0
|
||||||
pa_usec_t latency;
|
pa_usec_t latency;
|
||||||
|
|
||||||
if ((latency = pa_simple_get_playback_latency(s, &error)) == (pa_usec_t) -1) {
|
if ((latency = pa_simple_get_latency(s, &error)) == (pa_usec_t) -1) {
|
||||||
fprintf(stderr, __FILE__": pa_simple_get_playback_latency() failed: %s\n", pa_strerror(error));
|
fprintf(stderr, __FILE__": pa_simple_get_latency() failed: %s\n", pa_strerror(error));
|
||||||
goto finish;
|
goto finish;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue