[pulseaudio-discuss] [PATCH] simple: Improve pa_simple_read() documentation
Tanu Kaskinen
tanuk at iki.fi
Thu Oct 3 08:33:36 PDT 2013
There was a question in IRC about whether pa_simple_read() blocks or
not. It's already documented on the simple API overview page, but it's
good to say it also in the function reference. As a bonus, I added
some words about the error handling as well.
---
src/pulse/simple.h | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/pulse/simple.h b/src/pulse/simple.h
index 0fab8ee..4a8162b 100644
--- a/src/pulse/simple.h
+++ b/src/pulse/simple.h
@@ -137,7 +137,10 @@ int pa_simple_write(pa_simple *s, const void *data, size_t bytes, int *error);
/** Wait until all data already written is played by the daemon. */
int pa_simple_drain(pa_simple *s, int *error);
-/** Read some data from the server. */
+/** Read some data from the server. This function blocks until \a bytes amount
+ * of data has been received from the server, or until an error occurs.
+ * Returns a negative value on failure. If \a error is non-NULL, the error code
+ * is stored in it. */
int pa_simple_read(pa_simple *s, void *data, size_t bytes, int *error);
/** Return the playback latency. */
--
1.8.4.rc3
More information about the pulseaudio-discuss
mailing list