-
Notifications
You must be signed in to change notification settings - Fork 227
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jack : buffer per period parameter and audio latency calculation #437
Comments
There is a function called GetInOutLatencyMs() in Jamulus which is not implemented for the Jack audio interface (actually it is just implemented for the Windows ASIO interface). In the Jack audio help pages I found the following: |
@newlaurent62: --HPS |
I have implemented the GetInOutLatencyMs() for the Jack audio interface. I have tested it with two different audio devices with a Raspberry Pi. I'll make a fork for it soon. (I'm still learning GitHub). The basic gist is to call jack_port_get_latency_range(), which according to jackaudio.org is the function to call (about the only one of the latency functions that hasn't been deprecated.) After opening the jack ports, call this function twice, once for each direction (in and out.) On my Raspberry Pi 4, I plugged in a Behringer UMC404HD, and also a Focusrite Scarlett 4i4. I put in some debug print statements, and below are the results using a frames/period value of 64, and periods of 2, 3, and 4. The latencies reported below are in units of frames. Behringer, Frames/Period = 64, Periods/Buffer = 2: Input latency = 64, Output latency = 128, Total latency = 192 Scarlett, Frames/Period = 64, Periods/Buffer = 2: Input latency = 64, Output latency = 128, Total latency = 192 |
Okay, I created a fork and branch at bflamig/jamulus that has proposed changes to compute latency for Jack interfaces (blfamig:jack_latency). Just a few lines in two files. I'm unsure how to make a pull request. Github is still new to me. |
Great, I saw your pull request, thanks. I'll do a review shortly. |
Your code is now applied to the Git master. Thanks again for fixing -> closed. |
Hello,
Changing buffer per period parameters in qjackctl decrease the number of Xruns (at least for USB Sound card) for the same period/frame but this increase the audio latency. Latency that is not report by Jamulus in settings.
It seems that Jamulus does not care of buffer per period in audio latency calculation.
BR,
Laurent
The text was updated successfully, but these errors were encountered: