如何在Ubuntu 12.04 LTS x86 Linux上的Pulseaudio和Jack之间切换?


10

我的Ubuntu 12.04上有一些需要Jack的应用程序。没有Jack,他们就不会开始,所以我必须保留Jackd +(QjackCtl)。现在,问题是Jackd一直无法正常启动。有时它运作良好,有时无法启动(我怀疑是Pulseaudio的原因)。

现在,我找到了一种解决方法,可以让Jack和Pulseaudio并排运行

1. Installing pulseaudio-modules-jack
2. Editing /etc/pulse/default.pa and adding these lines

    ### Load audio drivers statically
        load-module module-jack-sink
        load-module module-jack-source

重新启动电脑后,我可以看到Jack和Pulseaudio都正常工作。但这是另一个问题,扬声器的声音输出非常低,cpu尖峰增加了很多,未显示硬件设备。声音控制显示5:1声音系统,而我只有2:1声音系统。

我需要一种在Pulseaudio和Jack之间切换的方法。我不是专业音乐制作人。我仅在Im使用Ardor或其他需要Jack的应用程序时才需要Jackd。您必须认为启动Jack时Pulseaudio将被自动禁用。但这对我而言并非如此。以前我遇到过尝试这样的错误

这是该错误的日志

14:36:48.194 Patchbay deactivated.
    14:36:48.198 Statistics reset.
    14:36:48.228 ALSA connection change.
    14:36:48.241 D-BUS: Service is available (org.jackaudio.service aka jackdbus).
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server socket
    jack server is not running or cannot be started
    Registered event listener change listener:  true 
    14:36:48.258 ALSA connection graph change.
    14:37:12.679 D-BUS: JACK server could not be started. Sorry
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server socket
    jack server is not running or cannot be started
    QSpiAccessible::accessibleEvent not handled:  "2"  obj:  QMessageBox(0xbfd7c2d0) "" 
    FIXME: handle dialog start. 
    Sat Feb  2 14:37:12 2013: Starting jack server...
    Sat Feb  2 14:37:12 2013: JACK server starting in realtime mode with priority 10
    Sat Feb  2 14:37:12 2013: [1m[31mERROR: Cannot lock down 82241434 byte memory area (Cannot allocate memory)[0m
    Sat Feb  2 14:37:12 2013: control device hw:0
    Sat Feb  2 14:37:12 2013: control device hw:0
    Sat Feb  2 14:37:12 2013: [1m[31mERROR: Failed to acquire device name : Audio0 error : Cannot allocate memory[0m
    Sat Feb  2 14:37:12 2013: [1m[31mERROR: Audio device hw:0 cannot be acquired...[0m
    Sat Feb  2 14:37:12 2013: [1m[31mERROR: Cannot initialize driver[0m
    Sat Feb  2 14:37:12 2013: [1m[31mERROR: JackServer::Open() failed with -1[0m
    Sat Feb  2 14:37:12 2013: [1m[31mERROR: Failed to open server[0m
    Sat Feb  2 14:37:13 2013: Saving settings to "/home/soham/.config/jack/conf.xml" ...
    FIXME: handle dialog end. 
    14:37:17.923 Could not connect to JACK server as client. - Overall operation failed. - Unable to connect to server. Please check the messages window for more info.
    Cannot connect to server socket err = No such file or directory
    Cannot connect to server socket
    jack server is not running or cannot be started
    QSpiAccessible::accessibleEvent not handled:  "2"  obj:  QMessageBox(0xbfd7cb40) "" 
    FIXME: handle dialog start. 
    FIXME: handle dialog end. 
    QSpiAccessible::accessibleEvent not handled:  "6"  obj:  QMenu(0x8d0f0a0) "" 

现在我的问题是如何安全地在Pulse和Jack之间切换?是否有任何应用程序可以这样做?

这是屏幕截图-

Answers:


3

我目前发现的最佳选择是在jack运行时挂起pulseaudio。在pulseaudio和jack页面中对此进行了描述,并涉及通过调用jack服务器pasuspender

从手册页:

   pasuspender is a tool that can be used to tell a local PulseAudio sound
   server to temporarily suspend access to the  audio  devices,  to  allow
   other  applications  access  them  directly.  pasuspender  will suspend
   access to the audio devices, fork a child process, and when  the  child
   process terminates, resume access again.

0

我意识到这个问题是在很久以前被问到/回答的,但是我有一些额外的信息可能会对那些遇到此问题的人有所帮助。

原始海报表明,在同时使用脉冲音频和插孔时,它们正在经历CPU尖峰(滞后)。以我的经验(我是专业的工作室工程师),这是由于未运行可用于ardor等的低延迟内核引起的。等

我的建议是先使用rt-kernel安装并重新启动PC。内核应该在回购和突触中可用,但是源可能需要激活。

就个人而言,我会推荐rt-kernel,因为ubuntu会积极支持它并可用(并且不会影响您PC的整体日常使用。

By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.