[pulseaudio-discuss] Windows7 audio architecture

Lennart Poettering lennart at poettering.net
Sun Oct 18 13:18:18 PDT 2009

On Sun, 18.10.09 20:30, Ilyes Gouta (ilyes.gouta at gmail.com) wrote:

> Lennart,


> Does PA have the pull mode (as they call it) where the audio card
> calls back the user-space layer to tell the software mixer how much
> samples (I know, this is not a new science) we need to feed it in
> order to avoid an underrun, accompanying the time-based, not interrupt
> based, buffer submission? 

Yes, of course. That's how we always did it. Just use
pa_stream_set_write_callback() and pass a function to it you defined
that will then  be called each time your app needs to write new
data. It's the default mode of operation. Always has been.

And timer-based scheduling we have been doing since 0.9.11.

> What about the high priority thread (belonging to a special
> scheduling class) that manages all of this?

PA was able to make use of RT scheduling for quite some time
already. Howver, handing out RT scheduling priviliges to normal users
is a security issue, since that effectively allows them to freeze the
machine. The rtkit daemon most distributions have now integrated works
as a protection against that: it supervises user processes that got RT
and makes sure they don't misuse that. The whole idea is very similar
to what MS decided to do, except that rtkit is a bit less crackish I
guess. ;-)


Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4

More information about the pulseaudio-discuss mailing list