On Sun, 14.02.10 11:13, David Henningsson (launchpad.web at epost.diwic.se) wrote: > > Tristin Celestin wrote: > > Is there a downside to making a version of pa_stream_writable_size available in the > > simple API? > > Good question. In your use case, can see the use for a function > returning how many bytes that can be written to pa_simple_write without > pa_simple_write blocking. > > > Why would I want to specify the buffer attributes in the simple API with > > a buffer_attr, but not be able to query the state of the buffer while writing to it? > > If there is no free space in the buffer, the simple API blocks until all > data you send to it has been written to the buffer. This is a good > approach for some applications, although your app doesn't seem to be one > of them. Perhaps it is a PA design decision that apps that don't want > pa_simple_write to block, shouldn't use the simple API, I don't > know. Yes, that is exactly the case. The simple API is supposed to be a simplified, synchronous version of the complex, asynchronous API. _writable_size() only really makes sense in an asynchronous API. WHich is why I see no point in adding it to the simple API. Lennart -- Lennart Poettering Red Hat, Inc. lennart [at] poettering [dot] net http://0pointer.net/lennart/ GnuPG 0x1A015CC4