如何避免 XRUN 回呼跳過

如何避免 XRUN 回呼跳過

設定 QjackCtrl 和 Arour 後,我可以很好地錄製,但 XRUN 回調跳過很煩人。

這是我的 QjackCtrl 配置:

在日誌中我看到:

18:37:22.041 XRUN callback (97).
18:37:22.793 XRUN callback (42 skipped).
18:37:24.794 XRUN callback (111 skipped).
18:37:26.795 XRUN callback (111 skipped).
18:37:28.796 XRUN callback (111 skipped).
18:37:30.798 XRUN callback (75 skipped).
18:38:45.359 XRUN callback (552).
Mon Oct 20 18:38:45 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Running
Mon Oct 20 18:38:45 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:38:45 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:38:46 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Triggered
Mon Oct 20 18:38:46 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:38:46 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Triggered
Mon Oct 20 18:38:46 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
18:38:46.833 XRUN callback (3 skipped).
Mon Oct 20 18:38:46 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Triggered
Mon Oct 20 18:38:46 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:38:46 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:38:46 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Sink was not finished, state = Triggered
Mon Oct 20 18:38:46 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
18:38:48.834 XRUN callback (23 skipped).
18:40:28.031 XRUN callback (580).
Mon Oct 20 18:40:28 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Sink was not finished, state = Running
Mon Oct 20 18:40:28 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
18:40:28.884 XRUN callback (1 skipped).
Mon Oct 20 18:40:28 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Triggered
Mon Oct 20 18:40:28 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Sink was not finished, state = Running
Mon Oct 20 18:40:29 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Sink was not finished, state = Triggered
Mon Oct 20 18:40:29 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Sink was not finished, state = Triggered
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client PulseAudio JACK Source finished after current callback
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Running
Mon Oct 20 18:40:29 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Sink was not finished, state = Running
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = PulseAudio JACK Source was not finished, state = Triggered
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Triggered
Mon Oct 20 18:40:29 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Triggered
Mon Oct 20 18:40:29 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:40:29 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
Mon Oct 20 18:40:29 2014: ERROR: JackEngine::XRun: client = ardour was not finished, state = Triggered
Mon Oct 20 18:40:29 2014: ERROR: JackAudioDriver::ProcessGraphAsyncMaster: Process error
18:40:30.885 XRUN callback (32 skipped).
18:40:32.887 XRUN callback (89 skipped).

什麼是 XRUN 回調跳過?我該如何解決這些問題?

使用低延遲核心運行 Ubuntu 14.04:

$ uname -a
Linux laptop 3.13.0-38-lowlatency #65-Ubuntu SMP PREEMPT Thu Oct 9 12:04:28 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

答案1

再次遇到這個問題,終於得到了 xruns 發生原因的正確答案。

來自 JACKS 頁面:

指定 JACK process() 呼叫之間的幀數。 [b]該值必須是 2 的冪[/b],預設值為 1024。較大的周期大小
會產生較高的延遲,但會降低 xrun 的可能性。 JACK 擷取延遲(以秒為單位)為 --period 除以 --rate

您需要設定sample rate,frames/periodperiods/buffer更正。以下是最佳的USB裝置

(Frames [or buffer] / Sample Rate ) * Periods = Latency in ms

( 16 / 48000 ) * 3 = 1
( 32 / 48000 ) * 3 = 2
( 64 / 48000 ) * 3 = 4
( 128 / 48000 ) * 3 = 8
( 256 / 48000 ) * 3 = 16
( 512 / 48000 ) * 3 = 32
( 1024 / 48000 ) * 3 = 64
( 2048 / 48000 ) * 3 = 128
( 32 / 96000 ) * 3 = 1
( 64 / 96000 ) * 3 = 2
( 128 / 96000 ) * 3 = 4
( 256 / 96000 ) * 3 = 8
( 512 / 96000 ) * 3 = 16
( 1024 / 96000 ) * 3 = 32
( 2048 / 96000 ) * 3 = 64
( 64 / 192000 ) * 3 = 1
( 128 / 192000 ) * 3 = 2
( 256 / 192000 ) * 3 = 4
( 512 / 192000 ) * 3 = 8
( 1024 / 192000 ) * 3 = 16
( 2048 / 192000 ) * 3 = 32

我取了最優的,全部都在這裡: http://wiki.linuxaudio.org/wiki/list_of_jack_frame_period_settings_ideal_for_usb_interface

相關內容