[pulseaudio-discuss] Expand the simple API?
Tanu Kaskinen
tanuk at iki.fi
Wed Mar 20 00:57:48 PDT 2013
On Tue, 2013-03-19 at 13:20 +0100, Thomas Martitz wrote:
> Am 19.03.2013 10:56, schrieb Tanu Kaskinen:
> > I'd be OK with adding pa_simple_writable/readable_size(). I believe the
> > multi-threading aspect of adding the write/read callbacks unavoidably
> > makes writing applications not-simple, so the simple API probably
> > shouldn't have those callbacks.
> >
>
> It's not unlikely that an application that uses blocking or polling
> methods uses an extra thread for that, which it wouldn't do if it could
> use the callback method. So in this case the callback would simplify the
> application, because the multi threading aspect is not in the
> application logic but in pulseaudio. I don't know how common this case
> is, but I would expect it's rather common.
The applications would still need to be aware of the threading.
pa_simple_read/write() is expected to be done from the main thread, so
the application necessarily needs to implement some communication method
between the two threads.
--
Tanu
More information about the pulseaudio-discuss
mailing list