ALSA implementation
James Courtier-Dutton
James at superbug.co.uk
Wed Sep 20 13:59:35 CDT 2006
Jan Zerebecki wrote:
> On Mon, Sep 18, 2006 at 01:54:26AM -0400, Aaron Slunt wrote:
>> Jan, could you please clarify what you mean by an fd-based method? Thanks.
>
> On http://alsa-project.org/alsa-doc/alsa-lib/pcm.html search for the
> headline "Event waiting routines". That is what I meant with fd-based
> method. Below that is "Asynchronous notification" and it describes what
> we currently use in winealsa.
>
>
> Jan
>
I don't think asynchronous notification works at all well.
There are several polling methods that can be used.
1) block on poll
Used in jackd and generally considered the best method currently. It is
often called the "callback" method where one has a thread block on the
poll, and then call the "callback" function when triggered. jackd
expands on this idea letting multiple different applications "callback"
functions be called per trigger event.
2) let the audio buffer free wheel and use a timer to periodically
fill/drain the buffers. (what ex windows apps/games tend to do. E.g. Doom3.)
The current asynchronous method uses signals and as a result does not
tend to work at all well.
James
More information about the wine-devel
mailing list