Hmm, yes, I think this is correct. You might get errors if you push more than maxlength, but not more than tlength, at least from looking quickly at the code. Have you actually tried? Acked regardless. On 2016-01-11 14:28, Tanu Kaskinen wrote: > The old documentation implied that it wouldn't be possible to write > more than the returned amount, which was incorrect. > --- > src/pulse/stream.h | 9 ++++++++- > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/src/pulse/stream.h b/src/pulse/stream.h > index 70fa415..802660d 100644 > --- a/src/pulse/stream.h > +++ b/src/pulse/stream.h > @@ -588,7 +588,14 @@ int pa_stream_peek( > * calling pa_stream_peek(). */ > int pa_stream_drop(pa_stream *p); > > -/** Return the number of bytes that may be written using pa_stream_write(). */ > +/** Return the number of bytes that the server has requested to be written. > + * > + * Contrary to what might be expected from the function name, it's usually > + * possible to write more than the returned amount, but typically it doesn't > + * make sense to do that, because that will likely make the stream latency > + * exceed the target latency (which is configured with the tlength parameter in > + * pa_buffer_attr). > + */ > size_t pa_stream_writable_size(pa_stream *p); > > /** Return the number of bytes that may be read using pa_stream_peek(). */ > -- David Henningsson, Canonical Ltd. https://launchpad.net/~diwic