LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Trouble with mpd + pulse audio (https://www.linuxquestions.org/questions/linux-software-2/trouble-with-mpd-pulse-audio-4175530916/)

iwtbf 01-13-2015 01:07 PM

Trouble with mpd + pulse audio
 
I finally got mpd to work but one problem persists:

I can only play either music with mpd OR something else with audio(+/video). Not both at the same time. Then one or the other freezes or stop working in one manner or another.


When I first got mpd to work I could not adjust the volume so I added the user 'mpd' to the pulse group and added pulse output to my mpd.conf;



Code:

audio_output { 
        type            "pulse"
        name            "pulse audio"
}

... and commented out the other audio_input (alsa). Now my problem arises in the sense that there can only be one audio input so to speak.

I don't really know how pulse works so I'm having trouble attacking this problem.

I have a faint memory of having (and solving) this problem before. But I can't really recall how to fix this.

Any help on how to solve this would be highly appreciated!

Edit: If my problem is unclear or if I need to provide logs of any kind please tell!

273 01-13-2015 01:24 PM

As I understand it you can only run one instance of PulseAudio at a time so only one user can use the sound on a particular machine. I know that if I set up mpd as the user mpd using Pulse then I am then not able to use sound at all as my day-to-day account which means I have to run mpd as my day-to-day account for it to work.
I believe it's one of the many great features of PulseAudio...

pwalden 01-13-2015 11:12 PM

I believe pulse is a client-server architecture and you can run it as a system resource (at boot) with multiple non-system clients.

The out-of-the-box configuration for pulse in most distros is as a user resource. You can access the Pulseaudio org web site for how to set it up as a system resource.

273 01-14-2015 12:57 AM

Quote:

Originally Posted by pwalden (Post 5300598)
I believe pulse is a client-server architecture and you can run it as a system resource (at boot) with multiple non-system clients.

The out-of-the-box configuration for pulse in most distros is as a user resource. You can access the Pulseaudio org web site for how to set it up as a system resource.

I shall take a look at some point but if it's possible it's certainly not advertised and I've never seen mention of it on the various sites I've found when searching how to do something simple like force PulseAudio to default to a given sound device on startup.
PulseAudio may be versatile and configurable and it may be that Debian and the likes have made a dogs breakfast of it but nothing I have read about PulseAudio gives a straight answer to anything and the best resource I found for using it with mpd was the Arch Wiki which strongly suggested that whomever wrote it hadn't got it working as anything but the current logged-in user.

ax11 02-22-2015 08:36 AM

Quick and somewhat dirty:

- change "user" in /etc/mpd.conf to your username and
- uncomment the non-optional lines for the pulse audio plugin (also in /etc/mpd.conf)
- if MPD had already been running since system start:
(
- stop mpd
- sudo chmod your_username /var/run/mpd
)
- start mpd

This should work quite well on a single-user desktop system. It's not quite the way how things should be done on a unixoid system. But that appears to anything pulse-related.


All times are GMT -5. The time now is 02:18 AM.