在RHEL 6 x64中配置网络音频系统[NAS]时出错

时间:2012-12-19 09:35:23

标签: linux qt audio redhat

我尝试通过两种方法在RHEL 6中设置NAS(网络音频系统):

首先,通过RPM安装,

[root@localhost ~]# rpm -Uvh nas-1.9.2-1.el6.x86_64.rpm nas-libs-1.9.2-1.el6.x86_64.rpm

它已安装,但我在/etc/init.d/目录中找不到该服务。 只创建/etc/nas/nasd.conf文件。如果我运行命令

[root@localhost ~]# nasd
Network Audio System Release 1.9.2
Network Audio System Release 1.9.2
Init: Output open(/dev/dsp) failed: No such file or directory

Fatal server error:
could not create audio connection block info

其次,通过配置NAS站点提供的最新tar-ball nas-1.9.3.src.tar.gz 。 但问题是一样的。

请帮我正确安装,因为我想为基于qt的应用程序启用音频,qt使用NAS作为其音频功能。

2 个答案:

答案 0 :(得分:1)

非常尝试NAS,但没有成功解决我的问题。

然后我使用Phonon库来解决声音问题!!

Thanx反正帮助我! :)

答案 1 :(得分:1)

好。好吧已经有一段时间但是...

你没有足够的烫发来打开底层套接字。

me @ dev $ strace -o ./nasd.txt nasd -aa -config ./nasd.conf

Network Audio System Release 1.9.3
Network Audio System Release 1.9.3
Error binding unix socket: /var/run/nasd/audio0
: Address already in use

Fatal server error:
Cannot establish unix listening socket

适当的位来自strace

ioctl(0, SIOCGIFCONF, {96, {{"lo", {AF_INET, inet_addr("127.0.0.1")}}, {"wlan0", {AF_INET, inet_addr("192.168.1.69")}}, {"usb0", {AF_INET, inet_addr("192.168.15.100")}}}}) = 0
umask(0)                                = 022
mkdir("/var/run/nasd", 0777)            = -1 EEXIST (File exists)
unlink("/var/run/nasd/audio0")          = -1 EPERM (Operation not permitted)
socket(PF_FILE, SOCK_STREAM, 0)         = 1
bind(1, {sa_family=AF_FILE, path="/var/run/nasd/audio0"}, 22) = -1 EADDRINUSE (Address already in use)

unlink(“/ var / run / nasd / audio0”)= -1 EPERM(不允许操作)是线索。

如果我们在本地复制nasd.conf并将调试值调整为1并以root身份运行

me @ dev $ sudo nasd -aa -config ./nasd.conf

config: Maxfrags set to 3
config: Minfrags set to 2
config: Fragsize set to 256
config: Maxfrags set to 3
config: Minfrags set to 2
config: Fragsize set to 256
Network Audio System Release 1.9.3
Network Audio System Release 1.9.3
AuInitPhysicalDevices();
Init: will close device when finished with stream.
Init: will keep mixer device open.
Init: Leaving the mixer device options alone at startup.
Init: openDevice OUT /dev/snd/pcmC1D0p mode 1
Init: openDevice(1) IN /dev/snd/pcmC1D0c mode 0
setupSoundcard(...);
++ Setting up Output device (/dev/snd/pcmC1D0p)
+++ requesting wordsize of 16, got 8
+++ requesting 2 channel(s), got 1 channel(s)
+++ Requesting minimum sample rate of 5000, got 5000
+++ Requesting maximum sample rate of 44100, got 44100
setupSoundcard(...);
++ Setting up Input device (/dev/snd/pcmC1D0c)
+++ requesting wordsize of 8, got 8
+++ requesting 2 channel(s), got 1 channel(s)
+++ Requesting minimum sample rate of 4000, got 4000
+++ Requesting maximum sample rate of 44100, got 44100
initMixer: could not open output mixer device /dev/mixer: No such file or directory
Init: initMixer failed
createServerComponents(...);
closeDevice: out
closeDevice OUT /dev/snd/pcmC1D0p mode 1
closeDevice: in
closeDevice IN /dev/snd/pcmC1D0c mode 0
closeDevice: mixer
closeDevice: leaving mixer device(s) open

在我的情况下看起来我需要设置混音器部分,但这应该是nerf 你的错误。

编辑:initMixer: could not open output mixer device /dev/mixer: No such file or directory 这可以通过将mixer =""放在nasd.conf中来修复(即使文档声明它不会被尊重,也是如此)

另外:记得设置你的AUDIOSERVER env变量

export AUDIOSERVER=tcp/localhost:8000 

是默认值,但绝对不会伤害......

最后的想法:

默认情况下,许多x服务器现在-nolisten tcp,这可能是实现中需要考虑的问题。

nmap是你的朋友。

而且,为了记录,我还没有真正得到一个端到端的系统工作...... 希望其他一些善良的人会跳进去指出我错过的任何东西。

希望它有所帮助。

我没有rhel盒子......但是可能同样的烫发问题。 这些文档充其量只是“薄”