mpd in userspace with pulseaudio

create config for mpd:

vi ~/.config/mpd/mpd.conf

bind_to_address "172.16.254.254"
music_directory "/home/jasiu/Music"
playlist_directory "/home/jasiu/Music"
#db_file "/var/lib/mpd/mpd.db"
#log_file "/var/log/mpd.log"
user "jasiu"
audio_output {
 type "pulse"
 name "My Pulse Output"
 server "localhost"
# server "remote_server" # optional
# sink "remote_server_sink" # optional
}

modify configuration of pulseaudio to allow play through tcp from localhost

# vi /etc/pulse/default.pa

add this line to config:

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

If you do not want to restart your X session load desired module manually

$ pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1

and finally start mpd in userspace

$ mpd –no-daemon –verbose

To play not in user space:

Add user mpd to pulse access and modify global config /etc/mpd.conf

audio_output {
 type "pulse"
 name "My Pulse Output"
 server "localhost"
# server "remote_server" # optional
# sink "remote_server_sink" # optional
}

modify /etc/pulse/default.pa

load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1

restart pulseaudio

$ pulseaudio -k

Try to play using yours favourite mpd player:
for example MPDroid for mobile phone or Sonata for non Windows environment

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload CAPTCHA.