mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-04 13:29:59 -05:00
simple: Enable pa_simple_flush() on record streams and amend documentation
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
This commit is contained in:
parent
586324f0fc
commit
a247f7c581
2 changed files with 3 additions and 5 deletions
|
|
@ -423,8 +423,6 @@ int pa_simple_flush(pa_simple *p, int *rerror) {
|
||||||
|
|
||||||
pa_assert(p);
|
pa_assert(p);
|
||||||
|
|
||||||
CHECK_VALIDITY_RETURN_ANY(rerror, p->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE, -1);
|
|
||||||
|
|
||||||
pa_threaded_mainloop_lock(p->mainloop);
|
pa_threaded_mainloop_lock(p->mainloop);
|
||||||
CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
|
CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -80,11 +80,11 @@
|
||||||
*
|
*
|
||||||
* \li pa_simple_get_latency() - Will return the total latency of
|
* \li pa_simple_get_latency() - Will return the total latency of
|
||||||
* the playback or record pipeline, respectively.
|
* the playback or record pipeline, respectively.
|
||||||
|
* \li pa_simple_flush() - Will throw away all data currently in buffers.
|
||||||
*
|
*
|
||||||
* If a playback stream is used then a few other operations are available:
|
* If a playback stream is used then the following operation is available:
|
||||||
*
|
*
|
||||||
* \li pa_simple_drain() - Will wait for all sent data to finish playing.
|
* \li pa_simple_drain() - Will wait for all sent data to finish playing.
|
||||||
* \li pa_simple_flush() - Will throw away all data currently in buffers.
|
|
||||||
*
|
*
|
||||||
* \section cleanup_sec Cleanup
|
* \section cleanup_sec Cleanup
|
||||||
*
|
*
|
||||||
|
|
@ -153,7 +153,7 @@ int pa_simple_read(
|
||||||
/** Return the playback or record latency. */
|
/** Return the playback or record latency. */
|
||||||
pa_usec_t pa_simple_get_latency(pa_simple *s, int *error);
|
pa_usec_t pa_simple_get_latency(pa_simple *s, int *error);
|
||||||
|
|
||||||
/** Flush the playback buffer. This discards any audio in the buffer. */
|
/** Flush the playback or record buffer. This discards any audio in the buffer. */
|
||||||
int pa_simple_flush(pa_simple *s, int *error);
|
int pa_simple_flush(pa_simple *s, int *error);
|
||||||
|
|
||||||
PA_C_DECL_END
|
PA_C_DECL_END
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue