[Jack-Devel] Jack Problems

Fons Adriaensen fons at linuxaudio.org
Wed Mar 27 12:30:43 CET 2019


On Wed, Mar 27, 2019 at 12:04:41PM +0100, Kjetil Matheussen wrote:

> > Also, direct client-to-client wakeup will not be possible anymore. A
> > client first has to call some gain-stage or return execution to jackd to
> > apply the gain. This adds an extra context switch.
> >
> 
> I don't think this is correct. First of all, you don't have to do
> anything differently than now unless gain volume has been set.

Not true. When there is only one output connected to a Jack inport
port, the receiving client does not have its own input buffer, it
just gets a pointer to the output buffer of the source client.
So when you change the gain to anything non-unity, a new buffer
needs to be allocated (since the output buffer can't be modified,
it may be used by other clients as well). This needs to be done
in a real-time context and without interrupting the signal. 
Possible, but not as simple as you imagine.

> Secondly, you would only need to apply volume to the sound block
> returned by jack_port_get_buffer in the client. If that sound block is
> used for other things as well, just make a temporary copy before
> applying the volume.

Same problem in different words. A 'temporary copy' needs extra
space which needs to be allocated. And doing the gain operation
there means it is applied to the mix of all incoming signals, not
to one particular connection.

> > Last but not least, gain-changes should be gradual, free of zipper
> > noise, so there's more complexity.
> 
> Yes, true, but not a big thing to implement.

Not so trivial if you want to do it right. For example the
ways a good mixer will smooth a fader gain change and a
mute/unmute will be quite different.

> > One of JACK's main concepts was that it provides a mechanism (not
> > policy). That's also why ports don't include delaylines to compensate
> > for latency. JACK is supposed to just pass data around and make
> > information available, not process data.
> >
> Doesn't matter what it's supposed to do.

It does. Jack has one clearly defined goal: to interconnect
audio processors. The processing itself is not part of that.
Where would it end ? Add delays, EQ, plugins to every connection ?

> gives the biggest benefit for the least amount of work.

Which is the current situation. 

Ciao,

-- 
FA




More information about the Jackaudio mailing list