[linux-audio-dev] Simple question on JACK and callbacks

New Message Reply About this list Date view Thread view Subject view Author view Other groups

Subject: [linux-audio-dev] Simple question on JACK and callbacks
From: Nelson Posse Lago (lago_AT_that.com.br)
Date: Wed Nov 14 2001 - 04:39:31 EET


Hi,

After reading *a lot* of the list archives and finding out that on the
LAAGA draft documentation, the exact information I wanted is marked as "to
be written" :-( , I decided to come to the mailing-list for help.

I'm trying to understand how JACK minimizes the number of context switches
when the clients are out-of-process; if I got this right, this is one of
the cool things it does (if it didn't, we would be able to run only a very
small number of concurrent realtime out-of-process audio apps).

At each tick, JACK "calls back" on the process() functions of all the
registered nodes, right? That is, it "jumps" to each of those functions
(since it keeps pointers to these functions). Well, do these process()
functions run inside the server address space (that is, are they part of
the server process, run just like any other server function)? If so, how
do they do their work (that is, how do they access the data they need)?
And, if so, shouldn't this be called "in-process"?

Getting more practical: suppose one of the nodes is a wave file player;
the "real" application has a thread that reads the disk data. How do this
data get to the process() function, since the process() function shouldn't
block and, therefore, can't read the disk by itself?

OTOH, if the process() function is not run inside the server, but as a
thread of the "main" app, how does this save any context switches?

I'm convinced the answer is simple, but I don't get it :-(.

See ya,
Nelson


New Message Reply About this list Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2b28 : Wed Nov 14 2001 - 04:41:25 EET