jack latency correction wierdness

Hi! I am using Audacity version 2.1.0 I have compiled for Fedora and I have found some weirdness when using jack and the latency correction feature in the recording tab of the preferences menu.
I was wondering if anyone could please confirm it?

I am doing a loop back test through a stereo mixer connected using analog stereo interconnects. I import a sound file into audacity and play the sound through jack’s system playback ports using audacity and record it back into audacity. That is to say that jack is running, and audacity displays jack audio connection kit as the driver and the recording and output are listed as default and default. Overdub is selected and soft play through is not selected in the preferences menu. The sound file is on track one and I press the record button to record in from the sound card’s input port into the second track as the first one plays. The sound records as the second track but it is out of sync (does not line up with the track above.) I then open the preferences menu and change the latency correction to -6 (which is the latency of the jack server as displayed by qjackctl.) I delete the first recorded track and press record again. The audio is recorded in sync.
I then close audacity and import the same file again. I press the record button and the track records out of sync. I then open the preferences dialog and change the -6 to 0. I delete the track I recorded and press record again. The track is recorded in sync.

So in short - the value I set as latency correction in the preferences menu appears not to be used correctly once the application has been closed and then restarted.
Can anyone confirm this please or link to a bug report?

Thanks

I don’t use JACK because I am only a casual Linux user. Steve can test if necessary when he comes along, but it’s not an issue I’m aware of.

Is qjackctl still showing -6 latency after restarting Audacity? Do you have to restart qjackctl to get an updated latency value?


Gale

6ms of latency is calculated by qjackctl as a result of setting 144 Frames/Period, 2 Periods/Buffer at 48000 sample rate. It’s a fixed value which is calculated using those values in qjackctl’s preferences menu. It essentially means that using those settings I expect to receive 6ms of latency when using jack unless I change those settings. I am not changing the settings once jack has started. But I wonder if Audacity is doing so?

The only time I am changing any values here in my test case is using audacity. I start jack and do not change any of it’s parameters at all during my test.
Hope that makes sense :confused: Thanks for the reply :slight_smile:

I’ve just tested this on my old laptop (on-board Intel sound chip).
Jack is set for a leisurely 17.4 ms.
Using the latency correction (as described here: http://manual.audacityteam.org/o/man/latency_test.html), Audacity’s latency correction set to -24.2 ms.
I’m using a stereo click track for the test.

Closed Audacity and restarted. The alignment is exact.

Shut down Audacity and Jack, then restart Jack and restart Audacity. Repeat the test. The alignment is still exact.

I’ll try rebooting…

It’s still dead on after a reboot - so no I can’t confirm the problem

Some things to check:

  1. A void pushing the system too hard. 6ms latency is pretty tight even for dedicated hardware.
  2. Ensure that you are using the same sample rate throughout.
  3. Ensure that you are getting no xruns.
  4. Ensure that you use a standard sample rate - if you know what your hardware uses internally, use that (probably 44.1 or 48 kHz).

this. I was importing a file which was encoded using 44100 sample rate.

Thanks for the help.