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

Hans Fugal hans at fugal.net
Fri Mar 18 15:24:01 UTC 2005

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?

 .O.  Hans Fugal            | De gustibus non disputandum est.
 ..O  http://hans.fugal.net | Debian, vim, mutt, ruby, text, gpg
 OOO                        | WindowMaker, gaim, UTF-8, RISC, JS Bach
GnuPG Fingerprint: 6940 87C5 6610 567F 1E95  CB5E FC98 E8CD E0AA D460
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.linuxaudio.org/pipermail/linux-audio-dev/attachments/20050318/797056fe/attachment.pgp>

More information about the Linux-audio-dev mailing list