mpd conflicting with other applications -- taking control of pulse?

Posted by Jamie Schembri on Ask Ubuntu See other posts from Ask Ubuntu or by Jamie Schembri
Published on 2011-03-04T18:32:16Z Indexed on 2011/03/04 23:33 UTC
Read the original article Hit count: 336

Filed under:
|
|

Simple explanation

If mpd is playing and sound attempts to play through another application, x, sound from x will not be output.

If sound from another application, x, is playing and mpd then attempts to play, no sound will be output from mpd whilst sound from x continues to play.

Details

I first noticed this problem with Flash, and this continues to be the most common scenario. I posted a question about this before realising it was not strictly Flash-related, but instead is something to do with mpd.

My biggest frustration comes from trying to get mpd working again, as I can't seem to pin down any method. Sometimes pulseaudio -k seems to help, other times sudo /etc/init.d/mpd restart, others killing Chromium (due to Flash) with SIGTERM. Most of the time it's a combination of the above.

I think this might be because I run mpd as another user and use pulseaudio. It is not run as root or current user. Also, mpd is compiled with pulse support.

I have tried numerous things, however I honestly couldn't recite what, as it has been some time since. I'd rather not go poking around without some direction, but I'd be really happy to fix this problem once and for all.

mpd.conf

Simplified by removing comments/blank lines.

music_directory     "/var/lib/mpd/music"
playlist_directory      "/var/lib/mpd/playlists"
db_file         "/var/lib/mpd/tag_cache"
log_file            "/var/log/mpd/mpd.log"
pid_file            "/var/run/mpd/pid"
state_file          "/var/lib/mpd/state"

user                "mpd"
bind_to_address     "wilson"

input {
        plugin "curl"
}

audio_output {
    type        "pulse"
    name        "My Pulse Output"

}

filesystem_charset      "UTF-8"
id3v1_encoding          "UTF-8"

Question

For the sake of keeping this a question: does anyone know what is causing this, or how to fix it?

© Ask Ubuntu or respective owner

Related posts about sound

Related posts about pulseaudio