[LAU] Estimating JACK latency

Paul Davis paul at linuxaudiosystems.com
Mon Apr 16 21:38:17 UTC 2012

On Mon, Apr 16, 2012 at 5:21 PM, S. Massy <lists at wolfdream.ca> wrote:
> On Mon, Apr 16, 2012 at 04:54:45PM -0400, Paul Davis wrote:

>> 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()
> I did, but clearly, I'm missing something. When using "jack_lsp -l" to
> get latency, I get: 384 frames for system:playback_*, which is right
> for my set-up, 128 frames for system:capture_*, and 0  frames for
> jconvolver, which can't be rright. Shouldn't the least it can be 384
> frames (-p128 -n3)?

you're using an old version of JACK. the output of jack_lsp -l is a
*range* of values for each port:

	port latency = 0 frames
	port playback latency = [ 1024 1024 ] frames
	port capture latency = [ 0 0 ] frames

> Is that value an absolute or relative to the nominal latency?

its neither. you must read the docs and understand them to understand
what is it telling you. the basic idea is to provide a way to be able
to answer one or both of the two questions:

    * how long has it been since the data i'm handling in a process()
callback arrived at the edge of the JACK graph?

    * how long will it be until the data i'm handing in a process
callback() will arrive at the edge of the JACK graph?

More information about the Linux-audio-user mailing list