1JACK_IODELAY(1)             General Commands Manual            JACK_IODELAY(1)
2
3
4

NAME

6       jack_iodelay - JACK toolkit client to measure roundtrip latency
7

SYNOPSIS

9       jack_iodelay
10

DESCRIPTION

12       jack_iodelay  will  create one input and one output port, and then mea‐
13       sures the latency (signal delay) between them. For this  to  work,  the
14       output  port  must  be  connected to its input port. The measurement is
15       accurate to a resolution of greater than 1 sample.
16
17       The expected use is to connect jack_iodelay's output port to a hardware
18       playback  port, then use a physical loopback cable from the correspond‐
19       ing hardware output connector to an input  connector,  and  to  connect
20       that  corresponding hardware capture port to jack_iodelay's input port.
21       This creates a roundtrip that goes through  any  analog-to-digital  and
22       digital-to-analog converters that are present in the audio hardware.
23
24       Although  the hardware loopback latency is the expected use, it is also
25       possible to use jack_iodelay to measure the  latency  along  any  fully
26       connected signal path, such as those involving other JACK clients.
27
28       Once  jack_iodelay  completes  its  measurement it will print the total
29       latency it has detected. This will include the JACK  buffer  length  in
30       addition  to  any other latency in the signal path. It will continue to
31       print the value every 0.5 seconds so that if  you  wish  you  can  vary
32       aspects of the signal path to see their effect on the measured latency.
33
34       If  no  incoming  signal  is detected from the input port, jack_iodelay
35       will print
36
37        Signal below threshold... .
38
39       every second until this changes (e.g. until you establish  the  correct
40       connections).
41
42       To  use the value measured by jack_iodelay with the -I and -O arguments
43       of a JACK backend (also called Input Latency and Output Latency in  the
44       setup  dialog of qjackctl), you must subtract the JACK buffer size from
45       the result. The buffer size is determined by multiplying the number  of
46       frames  per  period  (given  to the jackd backend by the -p or --period
47       option) by the number of periods per buffer (given to the jackd backend
48       by  the -n or --nperiods option).  Note that JACK2 will add an implicit
49       additional period when using the  default  asynchronous  mode,  so  for
50       JACK1  or  JACK2  in  synchronous mode, the buffer size is n*p, but for
51       JACK2 in asynchronous mode the buffer size is (n+1)*p.  Once  the  JACK
52       buffer  size is subtracted from the measured latency, the result is the
53       "extra" latency due to the interface hardware.  Then,  if  you  believe
54       that  the  latency  is equally distributed between the input and output
55       parts of your audio hardware (extremely likely), divide the  result  by
56       two  and  use that for input and output latency values. Doing this mea‐
57       surement will enable JACK clients that use  the  JACK  latency  API  to
58       accurately  position/delay audio to keep signals synchronized even when
59       there are inherent delays in the end-to-end signal pathways.
60

AUTHOR

62       Originally written in C++ by Fons Adriaensen, ported  to  C  by  Torben
63       Hohn.
64
65
66
671.9.12                           December 2019                 JACK_IODELAY(1)
Impressum