Re: [LAU] Estimating JACK latency

From: Paul Davis <paul@email-addr-hidden>
Date: Mon Apr 16 2012 - 23:54:45 EEST

On Mon, Apr 16, 2012 at 3:31 PM, S. Massy <lists@email-addr-hidden> wrote:
> Hello,
>
> Here is the use-case. Sending audio from one application to be processed
> by another jack client  before being sent back, the processed signal
> being mixed back in, possibly with a copy of itself. How would one go
> about estimating by how much the processed signal was delayed?

you don't have to estimate it. JACK will tell you.

> 1) JACK base latency:
> My understanding is that JACK will always introduce a latency of
> buffer_size*period_size*nperiods, is that correct?

no, just period_size * nperiods.

> If the signal is
> sent, processed, then sent back, the acquired delay would at least be
> twice the nominal jack latency, right?

yep.

> - Problem: On the practical side, how could we calculate the base
>  latency using available jack utilities? There's jack_bufsize and
>  jack_samplerate, but no way to find the number of periods, I think.

you don't. you use the part of the API that is specifically designed
for this. read the docs for jack_port_get_latency_range()

> 2) Latency of the processing client.
> That would depend largely on the client, I guess.  The README.CONFIG for
> jconvolver states that setting the partition number to be equal to the
> jack period size would result in zero latency, for example...

it does depend on the client. a well behaved client will use
jack_port_set_latency_range() to let the rest of the world know what
is going on.
_______________________________________________
Linux-audio-user mailing list
Linux-audio-user@email-addr-hidden
http://lists.linuxaudio.org/listinfo/linux-audio-user
Received on Tue Apr 17 00:15:04 2012

This archive was generated by hypermail 2.1.8 : Tue Apr 17 2012 - 00:15:04 EEST