Re: [linux-audio-dev] jack and alsa design issue

From: Dave Robillard <drobilla@email-addr-hidden>
Date: Sat Mar 19 2005 - 10:05:27 EET

On Fri, 2005-18-03 at 08:24 -0700, Hans Fugal wrote:
> I'm writing an application that will use alsa in the common case, but be
> jack-capable. I'm faced with the following design question: Do I wrap
> the jack part to emulate the read/write of alsa, or do I wrap the alsa
> part to emulate the callback style of jack? In other words, do I push or
> pull from the audio segment of the program?
>
> As I understand it, alsa can be asynchronous but it requires using SIGIO
> which doesn't excite me. So I'd have to create another thread that
> selects and fills a ringbuffer.
>
> To adapt jack, I'd have a ringbuffer which is drained when the program
> pulls the audio.
>
> Adapting Jack seems the easier thing to do, but what do you think?

Definitely write everything as a "pulling" callback-based system, and
wrap that for alsa. A callback is simple to wrap in a blocking system,
but the other way around just doesn't work (certainly not with jack's RT
requirements anyway)

-DR-
Received on Fri Mar 18 20:15:16 2005

This archive was generated by hypermail 2.1.8 : Fri Mar 18 2005 - 20:15:16 EET