![MPD:没有混音器 - ncmpcpp 没有声音](https://linux22.com/image/1068737/MPD%EF%BC%9A%E6%B2%A1%E6%9C%89%E6%B7%B7%E9%9F%B3%E5%99%A8%20-%20ncmpcpp%20%E6%B2%A1%E6%9C%89%E5%A3%B0%E9%9F%B3.png)
我的问题是这样的。我一直在配置 mpd 和 ncmpcpp。这是我的 mpd 配置:
music_directory "/media/dylan-roman/Acer/Users/Dylan/Music"
playlist_directory "/media/dylan-roman/Acer/Users/Dylan/Music"
db_file "/home/dylan-roman/.mpd/mpd.db"
log_file "/home/dylan-roman/.mpd/mpd.log"
pid_file "/home/dylan-roman/.mpd/mpd.pid"
state_file "/home/dylan-roman/.mpd/mpdstate"
user "mpd"
bind_to_address "localhost"
port "6600"
#audio_output {
#type "alsa"
#name "alsa for audio soundcard"
#mixer_type "software"
#}
audio_output {
type "pulse"
name "pulse audio"
}
audio_output {
type "fifo"
name "my_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
这是我的 ncmpcpp 配置:
[mpd]
mpd_music_dir = "/media/dylan-roman/Acer/Users/Dylan/Music"
mpd_host = "localhost"
#mpd_port = "6600"
mpd_crossfade_time = "2"
ncmpcpp_directory = /home/dylan-roman/.ncmpcpp
[visualizer]
visualizer_fifo_path = "/tmp/mpd.fifo"
visualizer_in_stereo = "no"
visualizer_type = "wave"
visualizer_output_name = "my_fifo"
visualizer_look = "│┃"
visualizer_color = "default"
[header]
header_visibility = "no"
header_window_color = "default"
volume_color = "default"
state_line_color = "black"
[playlist]
playlist_display_mode = "classic"
song_list_format = "{{%a - %t}|{%f}}{$R%l}"
now_playing_prefix = "$b$2"
now_playing_suffix = "$/b$9"
[statusbar]
progressbar_look = "─╼ "
progressbar_color = "black"
statusbar_visibility = "no"
statusbar_color = "default"
song_status_format = "{{%a{ - %t}}|{ - %f}{ - %b{ (%y)}}}"
[library]
song_library_format = "{{%a - %t}|{%f}}{$R%l}"
empty_tag_color = "black"
[global]
colors_enabled = "yes"
main_window_color = "default"
centered_cursor = "yes"
enable_window_title = "yes"
external_editor = "vim"
一切似乎都运行正常,但是当我播放歌曲时,它没有声音,出现以下消息:
MPD: no mixer
我已经在 Google 上搜索过解决方案,但还是没能解决问题
这是我运行 systemctl --user status mpd 时得到的结果:
`● mpd.service - Music Player Daemon
Loaded: loaded (/usr/lib/systemd/user/mpd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Wed 2020-06-10 08:33:13 -04; 18s ago
TriggeredBy: ● mpd.socket
Docs: man:mpd(1)
man:mpd.conf(5)
file:///usr/share/doc/mpd/html/user.html
Process: 4095 ExecStart=/usr/bin/mpd --no-daemon (code=exited, status=1/FAILURE)
Main PID: 4095 (code=exited, status=1/FAILURE)
jun 10 08:33:13 dylan systemd[1986]: Starting Music Player Daemon...
jun 10 08:33:13 dylan mpd[4095]: Jun 10 08:33 : exception: Failed to bind to '127.0.0.1:6600'
jun 10 08:33:13 dylan mpd[4095]: Jun 10 08:33 : exception: nested: Failed to bind socket: Address already in use
jun 10 08:33:13 dylan systemd[1986]: mpd.service: Main process exited, code=exited, status=1/FAILURE
jun 10 08:33:13 dylan systemd[1986]: mpd.service: Failed with result 'exit-code'.
jun 10 08:33:13 dylan systemd[1986]: Failed to start Music Player Daemon.
` 执行 sudo systemctl status mpd 时
● mpd.service - Music Player Daemon
Loaded: loaded (/lib/systemd/system/mpd.service; disabled; vendor preset: enabled)
Active: inactive (dead)
Docs: man:mpd(1)
man:mpd.conf(5)
file:///usr/share/doc/mpd/html/user.html
答案1
确保以适当的用户身份运行 mpd 非常重要,如果这些配置在,/home/$USER/.config/
则需要以 身份运行 mpd $USER
。如果 mpd 以 root 身份运行,/etc/mpd.conf
则将读取 处的 root 配置。
尝试systemctl --user status mpd
找出sudo systemctl status mpd
mpd 是以用户身份还是以 root 身份运行。