我遇到了一个让我完全困惑的问题。首先,一些系统信息
Linux quasar-nixos-tr 4.19.87 #1-NixOS SMP Sun Dec 1 08:17:47 UTC 2019 x86_64 GNU/Linux现在,我正在播放一个名为C声的声音生成/音乐库,我看到了一个奇怪的问题。
我正在使用通过Haskell在code上的一个层;这个库名为csound-expression,它仅仅是基于一些Haskell代码生成一个code文件,然后通过code运行它。
根据我的理解,c声波然后将音频路由到Alsa,在我的系统上,它试图通过PulseAudio的default设备来路由它。
现在,我的系统出了点奇怪的事。
systemctl --user status pulseaudio.service pulsaudio.socket的检查显示,服务已经死了,并且它已经耗尽了最大的服务。不是的。试着启动。pavucontrol;我现在可以连接到PA服务,但是我的haskell代码不能再连接了。相反,它使用:λ> dac退出。osc $2000dBFS级别= 32768.0 --C声版本6.13 (双样本)1970年1月1日承诺:无 libsndfile-1.0.28 UnifiedCSD: tmp.csd启动文件创建选项创建乐队结束标记创建分数rt音频: ALSA模块启用rtmidi: ALSA模块在乐队编译结束时已启用时间: real: 0.001s,CPU: 0.001s排序分数.在分数排序结束时经过的时间: real: 0.001s,CPU: 0.001s显示被抑制的0dBFS级别=1.0orch,现在加载的音频缓存在256个示例帧块中: ALSA:(Pulse_connect) PulseAudio:无法连接:连接拒绝为音频输入打开设备‘默认’:连接拒绝初始化返回给freespace结束的实时音频输入非活动分配程序。总体amps: 0.00000个超出范围的总体样本:性能结束时性能运行时间出现0 1次错误: real: 0.169 s,CPU: 0.004s在案例1(上面)中,我在日志中看到了一些有趣的东西,但由于我对PA如何工作、Alsa如何工作以及这两者是如何一起工作的理解而受到限制:
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Starting Sound Service...
Dec 16 09:28:16 quasar-nixos-tr pulseaudio[2382]: E: [pulseaudio] socket-server.c: bind(): Address already in use
Dec 16 09:28:16 quasar-nixos-tr pulseaudio[2382]: E: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.
Dec 16 09:28:16 quasar-nixos-tr pulseaudio[2382]: E: [pulseaudio] main.c: D-Bus name org.PulseAudio1 already taken.
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Failed with result 'exit-code'.
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Failed to start Sound Service.
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Service RestartSec=500ms expired, scheduling restart.
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: pulseaudio.service: Scheduled restart job, restart counter is at 4.
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Stopped Sound Service.
Dec 16 09:28:16 quasar-nixos-tr systemd[1708]: Starting Sound Service...
Dec 16 09:28:17 quasar-nixos-tr pulseaudio[2390]: E: [pulseaudio] socket-server.c: bind(): Address already in use
Dec 16 09:28:17 quasar-nixos-tr pulseaudio[2390]: E: [pulseaudio] module.c: Failed to load module "module-esound-protocol-unix" (argument: ""): initialization failed.
Dec 16 09:28:17 quasar-nixos-tr pulseaudio[2390]: E: [pulseaudio] main.c: D-Bus name org.PulseAudio1 already taken.
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Main process exited, code=exited, status=1/FAILURE
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Failed with result 'exit-code'.
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: Failed to start Sound Service.
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Service RestartSec=500ms expired, scheduling restart.
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Scheduled restart job, restart counter is at 5.
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: Stopped Sound Service.
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Start request repeated too quickly.
Dec 16 09:28:17 quasar-nixos-tr systemd[1708]: pulseaudio.service: Failed with result 'exit-code'.这里的用户在audio和sound组中,我使用的是NixOS;这可能与这个问题无关。
有人能帮上忙吗?
还请注意;在案例2中;alsamixer正确地列出了所有设备。
发布于 2019-12-16 11:23:48
我终于找到了这个问题;我已经描述了这里,以防其他人在将来遇到这个问题。
https://unix.stackexchange.com/questions/557454
复制相似问题