[Nix-dev] Getting pulseaudio to play nicely with MPD

Mateusz Kowalczyk fuuzetsu at fuuzetsu.co.uk
Fri Apr 25 22:19:50 CEST 2014


On 04/25/2014 10:17 PM, Mateusz Kowalczyk wrote:
> Greetings,
> 
> As OSS is not packaged (yet), ALSA and pulseaudio seemed like the next
> step. As usual with pulseaudio it means a lot of tears.
> 
> After a while I managed to have separate ‘mpv’ instances to play
> together nicely by using an override with pulseSupport = true.
> 
> I have a problem if I try to use ‘mpv’ and MPD at the same time however.
> If I'm using MPD then ‘mpv’ can't get access to audio (and the video
> doesn't play more than 1 frame at a time but that seems to be ‘mpv’
> bug). Likewise, if ‘mpv’ is playing, MPD won't be able to gain audio.
> 
> The problem is that I can't get MPD to use pulseaudio. Everywhere on the
> net we can find that we need something like this in our config:
> 
> audio_output {
>   type "pulse"
>   name "MPD pulseaudio"
> }
> 
> but if I do that, I just get:
> 
> fatal_error: line 139: No such audio output plugin: pulse
> 
> and MPD doesn't start.
> 
> For reference, maybe somewhat strangely, something like
> 
> audio_output {
>     type "oss"
>     name "MPD oss"
> }
> 
> plays sound (but exhibits the problem mentioned). I found this out by
> accident as I was re-using a config file I was using on a system with
> OSS. Perhaps some emulation is going on or something.
> 
> Did anyone manage to set up MPD with pulseaudio on NixOS? The pulseaudio
> NixOS wiki pages aren't exactly full of content so I'm a bit lost here.
> There seems to be nothing like pulseSupport optional flag for the mpd
> package.
> 

As it usually happens, the second I sent out the e-mail, I thought of
something else to try:

audio_output {
    type "alsa"
    name "MPD alsa"
}

allows my MPD and mpv to play together nicely. Hopefully this is useful
to someone.

-- 
Mateusz K.


More information about the nix-dev mailing list