Skip to content
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 increase latency after some time #534

Open
rkm432 opened this issue Jan 9, 2020 · 2 comments
Open

Jack increase latency after some time #534

rkm432 opened this issue Jan 9, 2020 · 2 comments

Comments

@rkm432
Copy link

rkm432 commented Jan 9, 2020

I have very powerfull system: core i9 9900KS with Windows 10. I started Hyper-V machine with guest OS Windows 10. Between OS and guest OS work virtual network 10Gb/s. Two systems have unlimited CPU resources.
I started in first OS: jackd portaudio + jack_load netmanager
In second OS: jackd net + jack_load audioadapter
Next, I connect ports of JACK for listening guest OS in OS - and all work, latency ~40ms, is good. But! After some times 5-15 min latency increases to 60-70ms! And sometimes, after 30-40 min left and right channels become asynchronous!

@uraura00
Copy link

Same issue here, only the setup differs since we have different hardware instances:
Intel NUC5 Ubuntu Bionic: no delay increase
Intel NUC10 Ubuntu Bionic: no delay increase
Intel NUC6 Ubuntu Bionic: the exact same delay increase when we speak through the microphone of the headset plugged in in the NUC6, also we hear the recorded audio double (left and right out of sync)

Test done by recording the microphone directly on the NUC6:
jack_rec -f ./nuc_gaps.wav -d 500 audioadapter:capture_1 audioadapter:capture_2
In this recording I see now and then gaps of 0 values for about 20 up to 50 ms, does those random gaps (once every 10 minutes approximately) cause the audioadapter ringbuffer to increase? In this recording it is also clearly visible that the left and right channel of our mono microphone is out of sync (alsa doubles the mono microphone channel to stereo).

I have seen that sometimes after days the buffer increments up to 65536 frames!!! (=1.365 seconds delay!!!): log says

Output available = 256
JackLibSampleRateResampler::ReadResample error written_frames = 255
JackAudioAdapterInterface::PushAndPull ringbuffer failure... reset
Ringbuffer size = 65536 frames

I think it is unrelated, but we use the alsa backend: command line to start jack server

/usr/bin/jackd --sync --realtime --realtime-priority 89 --timeout 2000 -d dummy --period 256 --rate 48000 --playback 0 --capture 0 &
sleep 0.5
/usr/bin/jack_load audioadapter --init "-d hw:0 -p 256 -n 4 -r 48000"

@uraura00
Copy link

Suppress the delay buildup by fixing the ringbuffer size which will be reset now and then.
Suppress the input channel to be out of sync left and right to chose only 1 of the duplicated mono channel:
/usr/bin/jack_load audioadapter --init "-d hw:0 -p 256 -n 4 -r 48000 -g 2048 -i 1 -o 2"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants