我使用的是 Ubuntu 16.04。我刚刚安装了 mpd 和 ncmpcpp。每当我播放任何音频文件时,ncmpcpp 都会检测到该文件并显示正在播放,但实际上并没有播放音频。我按照本教程介绍了如何安装和配置 mpc 和 ncmpcpp。这是我的 mpd 配置:
music_directory "~/Music"
playlist_directory "~/Playlists"
db_file "~/.local/share/mpd/mpd.db"
log_file "~/.local/share/mpd/mpd.log"
pid_file "~/.local/share/mpd/mpd.pid"
state_file "~/.local/share/mpd/mpd.state"
sticker_file "~/.local/share/mpd/sticker.sql"
bind_to_address "127.0.0.1"
log_level "default"
restore_paused "yes"
metadata_to_use "artist,album,title,track,name,genre,date"
auto_update "yes"
input {
plugin "curl"
}
audio_output {
type "pulse"
name "pulse audio"
}
audio_output {
type "fifo"
name "mpd_fifo"
path "/tmp/mpd.fifo"
format "44100:16:2"
}
编辑:我还想澄清一下,我尝试安装最新版本,因为它说这个答案,但我收到其中一个包的以下消息:
E: Package 'libsystemd-daemon-dev' has no installation candidate
因此,我下载了 .deb 文件并尝试从那里安装它。当我运行“sudo dpkg -i”和文件路径时,我收到此错误:
dpkg: error processing package libsystemd-daemon-dev (--install):
dependency problems - leaving unconfigured
Errors were encountered while processing:
libsystemd-daemon-dev
答案1
我找到了自己问题的答案。我必须安装 PulseAudio(我正在使用的)GUI:
sudo apt-get install pavucontrol
运行它,并修复问题。我想对于那些使用 alsa 的人来说,它会是混音器,对于其他声音服务器程序也是如此。