[pulseaudio-commits] 5 commits - src/pulse

Tanu Kaskinen tanuk at kemper.freedesktop.org
Fri Dec 20 02:51:32 PST 2013


 src/pulse/mainloop-api.h |    2 +-
 src/pulse/simple.c       |    2 --
 src/pulse/simple.h       |   13 +++++++------
 src/pulse/stream.h       |    7 +++----
 4 files changed, 11 insertions(+), 13 deletions(-)

New commits:
commit a247f7c58160bfd93039695cd7e60aa6108d53f4
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 16 14:18:17 2013 +0100

    simple: Enable pa_simple_flush() on record streams and amend documentation
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pulse/simple.c b/src/pulse/simple.c
index 9b8d14b..1891131 100644
--- a/src/pulse/simple.c
+++ b/src/pulse/simple.c
@@ -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);
 
diff --git a/src/pulse/simple.h b/src/pulse/simple.h
index ea2d0fb..54003ff 100644
--- a/src/pulse/simple.h
+++ b/src/pulse/simple.h
@@ -80,11 +80,11 @@
  *
  * \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

commit 586324f0fce0cd89e764147271f7f66a21a2ed38
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 16 14:18:16 2013 +0100

    doc: Document that pa_stream_flush() is applicable to playback and record streams
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pulse/stream.h b/src/pulse/stream.h
index e3f2d96..9fab629 100644
--- a/src/pulse/stream.h
+++ b/src/pulse/stream.h
@@ -200,7 +200,7 @@
  * \li pa_stream_drain() - Wait for the playback buffer to go empty. Will
  *                         return a pa_operation object that will indicate when
  *                         the buffer is completely drained.
- * \li pa_stream_flush() - Drop all data from the playback buffer and do not
+ * \li pa_stream_flush() - Drop all data from the playback or record buffer. Do not
  *                         wait for it to finish playing.
  *
  * \section seek_modes Seeking in the Playback Buffer
@@ -650,10 +650,9 @@ void pa_stream_set_buffer_attr_callback(pa_stream *p, pa_stream_notify_cb_t cb,
  * the stream, it will be created in corked state. */
 pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, void *userdata);
 
-/** Flush the playback buffer of this stream. This discards any audio data
+/** Flush the playback or record buffer of this stream. This discards any audio data
  * in the buffer.  Most of the time you're better off using the parameter
- * \a seek of pa_stream_write() instead of this function. Available on both
- * playback and recording streams. */
+ * \a seek of pa_stream_write() instead of this function. */
 pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
 
 /** Reenable prebuffering if specified in the pa_buffer_attr

commit ca2ec3a8ef97fedb622b81e45bf6fe1fcb51f216
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 16 14:18:15 2013 +0100

    doc: Document that pa_simple_get_latency() can be used on record streams as well
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pulse/simple.h b/src/pulse/simple.h
index 2224766..ea2d0fb 100644
--- a/src/pulse/simple.h
+++ b/src/pulse/simple.h
@@ -78,12 +78,13 @@
  *
  * \section ctrl_sec Buffer control
  *
+ * \li pa_simple_get_latency() - Will return the total latency of
+ *                               the playback or record pipeline, respectively.
+ *
  * If a playback stream is used then a few other operations are 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.
- * \li pa_simple_get_latency() - Will return the total latency of
- *                               the playback pipeline.
  *
  * \section cleanup_sec Cleanup
  *
@@ -149,7 +150,7 @@ int pa_simple_read(
      * a negative value. It is OK to pass NULL here. */
     );
 
-/** Return the playback latency. */
+/** 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. */

commit acc5c29018a52158c0e59abaeba0d7eecfea888e
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 16 14:18:14 2013 +0100

    doc: Refer to seek parameter of pa_stream_write() in description of pa_stream_flush()
    
    pa_stream_write() has no delta parameter, but a seek parameter
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pulse/stream.h b/src/pulse/stream.h
index a6785ec..e3f2d96 100644
--- a/src/pulse/stream.h
+++ b/src/pulse/stream.h
@@ -652,7 +652,7 @@ pa_operation* pa_stream_cork(pa_stream *s, int b, pa_stream_success_cb_t cb, voi
 
 /** Flush the playback buffer of this stream. This discards any audio data
  * in the buffer.  Most of the time you're better off using the parameter
- * delta of pa_stream_write() instead of this function. Available on both
+ * \a seek of pa_stream_write() instead of this function. Available on both
  * playback and recording streams. */
 pa_operation* pa_stream_flush(pa_stream *s, pa_stream_success_cb_t cb, void *userdata);
 

commit 05a128c8f7f09385b254622ce2e411442cbabf71
Author: Peter Meerwald <p.meerwald at bct-electronic.com>
Date:   Mon Dec 16 14:18:13 2013 +0100

    doc: Fix reference to pa_threaded_mainloop
    
    Generating docs for file mainloop-api.h...
    /home/pmeerw/src/pa-missing/src/pulse/mainloop-api.h:118: warning: Found unknown command `\pa_threaded_mainloop'
    
    Signed-off-by: Peter Meerwald <pmeerw at pmeerw.net>

diff --git a/src/pulse/mainloop-api.h b/src/pulse/mainloop-api.h
index e754960..600e0e3 100644
--- a/src/pulse/mainloop-api.h
+++ b/src/pulse/mainloop-api.h
@@ -115,7 +115,7 @@ struct pa_mainloop_api {
 };
 
 /** Run the specified callback function once from the main loop using an anonymous defer event. Note that this performs
- * multiple mainloop operations non-atomically. If, for example, you are using a \pa_threaded_mainloop, you will need to
+ * multiple mainloop operations non-atomically. If, for example, you are using a \ref pa_threaded_mainloop, you will need to
  * take the mainloop lock before this call. */
 void pa_mainloop_api_once(pa_mainloop_api*m, void (*callback)(pa_mainloop_api*m, void *userdata), void *userdata);
 



More information about the pulseaudio-commits mailing list