我正在使用 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
我找到了自己问题的答案。我必须安装 PulseAudio(我正在使用的)GUI:
运行它,然后解决问题。我想对于那些使用 alsa 的人来说,它会是混音器,等等其他声音服务器程序。