diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pulse/stream.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/pulse/stream.c b/src/pulse/stream.c index ababe176..00aa1cf9 100644 --- a/src/pulse/stream.c +++ b/src/pulse/stream.c @@ -2010,7 +2010,6 @@ static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command, success = 0; } else { - if (o->stream->direction == PA_STREAM_PLAYBACK) { if (pa_tagstruct_getu32(t, &o->stream->buffer_attr.maxlength) < 0 || pa_tagstruct_getu32(t, &o->stream->buffer_attr.tlength) < 0 || @@ -2027,6 +2026,20 @@ static void stream_set_buffer_attr_callback(pa_pdispatch *pd, uint32_t command, } } + if (o->stream->context->version >= 13) { + pa_usec_t usec; + + if (pa_tagstruct_get_usec(t, &usec) < 0) { + pa_context_fail(o->context, PA_ERR_PROTOCOL); + goto finish; + } + + if (o->stream->direction == PA_STREAM_RECORD) + o->stream->timing_info.configured_source_usec = usec; + else + o->stream->timing_info.configured_sink_usec = usec; + } + if (!pa_tagstruct_eof(t)) { pa_context_fail(o->context, PA_ERR_PROTOCOL); goto finish; |