[pulseaudio-discuss] What is latency? And other related questions

David Henningsson launchpad.web at epost.diwic.se
Sun Feb 14 02:13:33 PST 2010


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.

The tlength still controls the latency, and so it is still useful. E g,
I've been reviewing the PA output module for FluidSynth and there both
the simple API and setting tlength make sense.

// David




More information about the pulseaudio-discuss mailing list