{"id":357,"date":"2018-06-04T22:43:22","date_gmt":"2018-06-04T21:43:22","guid":{"rendered":"http:\/\/pruszewicz.com\/wordpress\/?p=357"},"modified":"2018-06-05T19:06:58","modified_gmt":"2018-06-05T18:06:58","slug":"mpd-in-userspace-with-pulseaudio","status":"publish","type":"post","link":"http:\/\/pruszewicz.com\/wordpress\/mpd-in-userspace-with-pulseaudio\/","title":{"rendered":"mpd in userspace with pulseaudio"},"content":{"rendered":"<p>create config for mpd:<\/p>\n<p>vi ~\/.config\/mpd\/mpd.conf<\/p>\n<pre>\r\n<code>bind_to_address \"172.16.254.254\"\r\nmusic_directory \"\/home\/jasiu\/Music\"\r\nplaylist_directory \"\/home\/jasiu\/Music\"\r\n#db_file \"\/var\/lib\/mpd\/mpd.db\"\r\n#log_file \"\/var\/log\/mpd.log\"\r\nuser \"jasiu\"\r\naudio_output {\r\n type \"pulse\"\r\n name \"My Pulse Output\"\r\n server \"localhost\"\r\n# server \"remote_server\" # optional\r\n# sink \"remote_server_sink\" # optional\r\n}<\/code>\r\n<\/pre>\n<p>modify configuration of pulseaudio to allow play through tcp from localhost<\/p>\n<p># vi \/etc\/pulse\/default.pa<\/p>\n<p>add this line to config:<\/p>\n<pre>\r\n<code>load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1<\/code>\r\n<\/pre>\n<p>If you do not want to restart your X session load desired module manually<\/p>\n<p>$ pacmd load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1<\/p>\n<p>and finally start mpd in userspace<\/p>\n<p>$ mpd &#8211;no-daemon &#8211;verbose<\/p>\n<p>To play not in user space:<\/p>\n<p>Add user mpd to pulse access and modify global config \/etc\/mpd.conf<\/p>\n<pre>\r\n<code>audio_output {\r\n type \"pulse\"\r\n name \"My Pulse Output\"\r\n server \"localhost\"\r\n# server \"remote_server\" # optional\r\n# sink \"remote_server_sink\" # optional\r\n}<\/code>\r\n<\/pre>\n<p>modify \/etc\/pulse\/default.pa<\/p>\n<pre>\r\n<code>load-module module-native-protocol-tcp auth-ip-acl=127.0.0.1 auth-anonymous=1<\/code>\r\n<\/pre>\n<p>restart pulseaudio<\/p>\n<p>$ pulseaudio -k<\/p>\n<p>Try to play using yours favourite mpd player:<br \/>\nfor example MPDroid for mobile phone or Sonata for non Windows environment<\/p>\n","protected":false},"excerpt":{"rendered":"<p>create config for mpd: vi ~\/.config\/mpd\/mpd.conf bind_to_address &#8220;172.16.254.254&#8221; music_directory &#8220;\/home\/jasiu\/Music&#8221; playlist_directory &#8220;\/home\/jasiu\/Music&#8221; #db_file &#8220;\/var\/lib\/mpd\/mpd.db&#8221; #log_file &#8220;\/var\/log\/mpd.log&#8221; user &#8220;jasiu&#8221; audio_output { type &#8220;pulse&#8221; name &#8220;My Pulse Output&#8221; server &#8220;localhost&#8221; # server &#8220;remote_server&#8221; # optional # sink &#8220;remote_server_sink&#8221; # optional } modify &hellip; <a href=\"http:\/\/pruszewicz.com\/wordpress\/mpd-in-userspace-with-pulseaudio\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[47,48],"tags":[],"class_list":["post-357","post","type-post","status-publish","format-standard","hentry","category-mpd","category-pulseaudio"],"_links":{"self":[{"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/posts\/357","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/comments?post=357"}],"version-history":[{"count":5,"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/posts\/357\/revisions"}],"predecessor-version":[{"id":362,"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/posts\/357\/revisions\/362"}],"wp:attachment":[{"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/media?parent=357"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/categories?post=357"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/pruszewicz.com\/wordpress\/wp-json\/wp\/v2\/tags?post=357"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}