]> code.delx.au - pulseaudio/blobdiff - src/pulse/stream.h
protocol-native: Allow clients to know at what index underrun occurred
[pulseaudio] / src / pulse / stream.h
index 010f968fea6e507c84758454eea9c7f91c80f6e9..e50ff0b1f7b32df8bbbd75feaee5919ae30ed5e6 100644 (file)
@@ -570,6 +570,12 @@ void pa_stream_set_read_callback(pa_stream *p, pa_stream_request_cb_t cb, void *
 /** Set the callback function that is called when a buffer overflow happens. (Only for playback streams) */
 void pa_stream_set_overflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);
 
+/** Return at what position the latest underflow occurred, or -1 if this information is not
+ * known (e g if no underflow has occurred, or server is older than 1.0).
+ * Can be used inside the underflow callback to get information about the current underflow.
+ * (Only for playback streams) \since 1.0 */
+int64_t pa_stream_get_underflow_index(pa_stream *p);
+
 /** Set the callback function that is called when a buffer underflow happens. (Only for playback streams) */
 void pa_stream_set_underflow_callback(pa_stream *p, pa_stream_notify_cb_t cb, void *userdata);