Re: [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: Re: [linux-audio-dev] Simple question on JACK and callbacks
From: Paul Davis (pbd_AT_Op.Net)
Date: Wed Nov 14 2001 - 20:52:00 EET


>If I understand correctly, by reading the source and arguing with paul
>:), the loop goes like this: well, actually, just the relevant part of
>engine.c (this is from the old tarball, i haven't checked out cvs yet):
>
>in the function jack_engine_process(), trimmed for brevity:
>
>write (client->subgraph_start_fd, &c, sizeof (c));
>
>pollfd[0].fd = client->subgraph_wait_fd;
>pollfd[0].events = POLLIN|POLLERR|POLLHUP|POLLNVAL;
>
>poll (pollfd, 1, engine->driver->period_interval);
>
>read (client->subgraph_wait_fd, &c, sizeof (c));
>
>so, if i understand correctly, jackd actually does get woken up after
>each process. that's also necessary, so that if a client takes too long
>that it can be cut out.

nope. the function jack_rechain_graph() rearranges the FIFO's that
connect each client, so that what karl described happens. in the above
code, the JACK server writes to the first fd in the chain, then waits
for either a read on the last fd, or a timeout. the "subchain" could
have involved a dozen clients while the server stays asleep.

--p


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 - 20:47:36 EET