【问题标题】:Error configuring Network Audio System [NAS] in RHEL 6 x64在 RHEL 6 x64 中配置网络音频系统 [NAS] 时出错
【发布时间】:2012-12-19 09:35:22
【问题描述】:

我尝试通过两种方法在 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 来实现其音频功能。

【问题讨论】:

  • Afaik Redhat 现在使用 systemd(因为没有 SysV,因此没有 /etc/init.d)。其次,/dev/dspOSS 使用,如今几乎没有任何 dist 使用。尝试安装OSS,这部分应该至少可以解决您的/dev/dsp 问题。很遗憾,我无法为您提供更多帮助。
  • 请问你为什么要安装NAS?作为一个项目,它并没有完全死去,但它似乎确实处于某种休眠状态,每隔几年左右才会出现一次......
  • 我正在为我的 qt 应用程序使用 QSound 类。播放.wav文件需要linux环境下的Nas支持。

标签: linux qt audio redhat


【解决方案1】:

NAS 尝试了很多,但没有成功解决我的问题。

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

谢谢你帮助我! :)

【讨论】:

    【解决方案2】:

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

    您没有足够的权限来打开底层套接字。

    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 (Operation not allowed) 是线索。

    如果我们将 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
    

    在我的情况下,我似乎需要设置混音器部分,但这应该会削弱 你的错误。

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

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

    export AUDIOSERVER=tcp/localhost:8000 
    

    是默认设置,但确定无妨...

    最后的想法:

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

    nmap 是你的朋友。

    而且,为了记录,我还没有真正让端到端系统工作...... 希望其他善良的灵魂能加入并指出我错过的任何事情。

    希望对你有帮助。

    我没有 rhel 盒子...但它可能是相同的烫发问题。 文档充其量是“瘦”

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-12-01
      • 1970-01-01
      • 2017-11-19
      相关资源
      最近更新 更多