1

我已经按照此处https://github.com/iani/RPI-first-steps#step-3-get-and-install-jack-audio-drivers的说明使用 Raspbian Jessie Lite 在 Raspberry Pi 3 上安装了 Jack 2和像这样http://jackaudio.org/faq/linux_rt_config.html将用户添加到“实时”组。

当我使用以下命令启动 Jack 服务器时:

$ jackd -P75 -dalsa -dhw:0 -p1024 -n3 -s -r44100

一切似乎都很好,杰克服务器输出是:

jackdmp 1.9.12
Copyright 2001-2005 Paul Davis and others.
Copyright 2004-2016 Grame.
Copyright 2016-2017 Filipe Coelho.
jackdmp comes with ABSOLUTELY NO WARRANTY
This is free software, and you are welcome to redistribute it
under certain conditions; see the file COPYING for details
JACK server starting in realtime mode with priority 75
self-connect-mode is "Don't restrict self connect requests"
creating alsa driver ... hw:0|hw:0|1024|3|44100|0|0|nomon|swmeter|soft-mode|32bit
configuring for 44100Hz, period = 1024 frames (23.2 ms), buffer = 3 periods
ALSA: final selected sample format for capture: 24bit little-endian in 3bytes format
ALSA: use 3 periods for capture
ALSA: final selected sample format for playback: 24bit little-endian in 3bytes format
ALSA: use 3 periods for playback

但是,当我尝试将 Pure Data 作为 Jack 客户端运行时,我会从 Pure Data 获得以下输出:

Connect: can't connect named semaphore name = jack_sem.1000_default_system err = No such file or directory
Cannot read socket fd = 9 err = No such file or directory
CheckRes error
JackSocketClientChannel read fail
Cannot open pure_data_0 client
error: JACK: server returned status 33

而杰克服务器抱怨:

ClientNotify fails name = system notification = 0 val1 = 0 val2 = 0
NotifyAddClient new_client fails name = pure_data_0
Cannot notify add client
Cannot create new client

我尝试使用 jack 用 mplayer 播放 mp3,但它的行为似乎相似。Mplayer 看起来像是在播放 mp3 但没有音频输出,控制台输出为:

Selected audio codec: MPEG 1.0/2.0/2.5 layers I, II, III [mpg123]
AUDIO: 44100 Hz, 2 ch, s16le, 160.0 kbit/11.34% (ratio: 20000->176400)
AO: [pulse] Init failed: Connection refused
[AO_ALSA] alsa-lib: pcm_hw.c:1557:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
[AO_ALSA] Playback open error: Device or resource busy
[AO OSS] audio_setup: Can't open audio device /dev/dsp: No such file or directory
Connect: can't connect named semaphore name = jack_sem.1000_default_system err = No such file or directory
Cannot open MPlayer [939] client
Cannot read socket fd = 9 err = No such file or directory
CheckRes error
JackSocketClientChannel read fail
[JACK] cannot open server
[AO SDL] Samplerate: 44100Hz Channels: Stereo Format s16le
[AO_ALSA] alsa-lib: pcm_hw.c:1557:(snd_pcm_hw_open) open '/dev/snd/pcmC0D0p' failed (-16): Device or resource busy
[AO_ALSA] alsa-lib: pcm_dmix.c:1022:(snd_pcm_dmix_open) unable to open slave
[AO SDL] Unable to open audio: No available audio device
AO: [null] 44100Hz 2ch s16le (2 bytes per sample)
Video: no video
Starting playback...
A:  20.1 (20.0) of 269.6 (04:29.6)  2.9% 

Jack server 的输出与前一种情况类似:

ClientNotify fails name = system notification = 0 val1 = 0 val2 = 0
NotifyAddClient new_client fails name = MPlayer [939]
Cannot notify add client
Cannot create new client

我对在 linux 上处理声音真的很陌生,虽然我读过一些关于 linux 音频架构的东西,但我迷路了。我试图从控制台输出中搜索所有不同的错误消息,但没有找到答案。也许我在这里错过了一些非常基本的东西。

任何建议表示赞赏。

提前致谢。

4

0 回答 0