The reason for this is due to the expectation of sound quality; by default, Jack has an enormous buffer in order to counter sound dropouts, also known as “XRuns,” caused by non-optimized systems. The downside to this buffer is that it creates a default latency of approximately 40-60 milliseconds. This is absolutely the worst thing for any professional to deal with, as the main marketing point for Jack is that it is low latency.
When it comes down to it, you have to balance the system between low latency and minimal XRuns; not enough buffer, and the sound will run out, causing breaks in the recordings. Too high of a buffer, and your latency suffers.
The values you need to look for are in the settings tab of the QT Jack Control. The values you can change are in the center column, and the one to keep an eye on is in the bottom-right corner.
On the bottom-right is the latency value. This determines the amount of latency involved in the audio digitization process; the lower the better. I find that 10ms is an excellent starting point if you want to have negligible latency balanced with solid audio stream. A beefier system is definitely a way to help reduce the latency.
But, now how about those values, huh?
These three values determine the amount of buffer the system has, and how fast the audio device will convert the audio. For quick reference, The sample rate determines how many samples are collected per channel per second. In the example, 48000 amplitude samples are collected every second. A frame is simply the collection of samples for all channels during a single cycle. In this case, the frame is considered a single sample rate cycle (1/48000th of a second in this case).
Essentially, the settings displayed above shows that the buffer has 2 periods of 256 cycles, resulting in a total buffer size of 1/94 of a second (1/(48000/256)) worth of audio data, which roughly equates to just a little over 1ms. You then want to double this (once for analog->digital and once for digital->analog), and you have the total round-trip buffer delay.
If you don’t understand the above, then the following should make this easier to understand.
- The lower the latency, the lower the reliability (the better the chance for breaks in the sound when the system can’t keep up).
- The higher the sample rate, the lower the latency. (more samples for the same period of time fill the same size buffer)
- The more frames per period, the higher the latency (the larger the period, the more samples are being buffered)
- The more periods in the buffer, the higher the latency (multiples of the above period)
With this information, you should now begin to understand how to get the most out of your recording. The trick is to use the lowest Frames/Period and Periods/Buffer that you can manage without dropouts; once you’ve accomplished this, then the digital audio should be much more responsive.
Good luck, and hopefully, this will make it easier to make something good!