]> code.delx.au - pulseaudio/commitdiff
simple: Enable pa_simple_flush() on record streams and amend documentation
authorPeter Meerwald <p.meerwald@bct-electronic.com>
Mon, 16 Dec 2013 13:18:17 +0000 (14:18 +0100)
committerTanu Kaskinen <tanu.kaskinen@linux.intel.com>
Fri, 20 Dec 2013 10:50:23 +0000 (12:50 +0200)
Signed-off-by: Peter Meerwald <pmeerw@pmeerw.net>
src/pulse/simple.c
src/pulse/simple.h

index 9b8d14bf72ad6f1a0073a7587f2ce9a902af4b51..18911316bdb8d23972901b4cfc26595f306ef643 100644 (file)
@@ -423,8 +423,6 @@ int pa_simple_flush(pa_simple *p, int *rerror) {
 
     pa_assert(p);
 
-    CHECK_VALIDITY_RETURN_ANY(rerror, p->direction == PA_STREAM_PLAYBACK, PA_ERR_BADSTATE, -1);
-
     pa_threaded_mainloop_lock(p->mainloop);
     CHECK_DEAD_GOTO(p, rerror, unlock_and_fail);
 
index ea2d0fb72a125ecc8388fbec2440e7ba65cc44d5..54003ffbca4019657eb3e5777383918e86f66872 100644 (file)
  *
  * \li pa_simple_get_latency() - Will return the total latency of
  *                               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_flush() - Will throw away all data currently in buffers.
  *
  * \section cleanup_sec Cleanup
  *
@@ -153,7 +153,7 @@ int pa_simple_read(
 /** Return the playback or record latency. */
 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);
 
 PA_C_DECL_END