mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-03 09:01:50 -05:00
protocol-native: Allow clients to know at what index underrun occurred
This patch introduces some extra protocol information, so protocol version is bumped. This functionality is primarily needed to solve a long standing issue in alsa-plugins, which should ignore underruns if and only if it is obsolete, i e, if more data has been written to the pipe in the meantime (which will automatically end the underrun). BugLink: http://bugs.launchpad.net/bugs/805940 Signed-off-by: David Henningsson <david.henningsson@canonical.com>
This commit is contained in:
parent
00493a4ef0
commit
1893234063
6 changed files with 36 additions and 4 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue