On Tue, 2013-03-19 at 14:27 +0100, David Henningsson wrote: > Hmm, just found something when looking at readable_size(). In case of > stream holes, _readable_size() would return more than can actually be > read by simple_read() without blocking. > > Do you think this limitation is acceptable? If not, do you think > pa_simple_readable_size should just return the length of the first > memblock like this: > > for (;;) { > pa_stream_peek(&data, &length); > if (data) > return length; > pa_stream_drop(length); > } Returning less than what really is readable doesn't sound like a good idea; principle of least surprise etc... We don't currently have the means for querying the "readable size without holes" in pa_stream or pa_memblockq, but those means could be added. -- Tanu