Trying to get MPD running on Raspbian Stretch, but outputting over pulseaudio - to allow network streams from other clients, too.
However, after a few seconds that MPD plays back, it stops and pulseaudio freezes. Will stay like this until I kill-and-reset pulseaudio.
Running pulseaudio in verbose mode shows me this:
("RPi audio (pulse)" is the name of the pulse device in /etc/mpd.conf)
Very likely related to Raspberry Pi/Linux (issue #688): "snd_bcm2835 and Pulseaudio 5 do not get along".D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Implicit underrun of 'RPi audio (pulse)'
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.default: Found underrun 1712 bytes ago (2692 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] sink.c: alsa_output.default: Found underrun 3476 bytes ago (928 bytes ahead in playback buffer)
D: [alsa-sink-bcm2835 ALSA] protocol-native.c: Requesting rewind due to end of underrun.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Requested to rewind 29908 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Limited to 2384 bytes.
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: before: 596
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: after: 596
D: [alsa-sink-bcm2835 ALSA] alsa-sink.c: Rewound 2384 bytes.
D: [alsa-sink-bcm2835 ALSA] sink.c: Processing rewind...
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 2384 bytes on render memblockq.
D: [alsa-sink-bcm2835 ALSA] sink-input.c: Have to rewind 2384 bytes on render memblockq.
D: [alsa-sink-bcm2835 ALSA] source.c: Processing rewind...
Special thanks to users "strfry" and "maxnet" for explaining in detail what might be the culprit causing this problem.
Long story short, it's very likely ALSA's "rewind" function that has issues with the driver for Raspberry's "bcm2835" soundchip.
According to other users, it works fine with e.g. external USB soundcard. Maybe also a HifiBerry, but I'm not 100% sure.
Giving up for the time being.
Other possibly related issues: