Maybe we can also look if PulseAudio is installed and if a pulseaudio process is running? If yes, we select it as the default Audio Output for MPD, if not we keep ALSA.
But anyway, we should enable (i.e. uncomment in /etc/mpd.conf) both ALSA and PulseAudio outputs, so that in case the wrong one is selected by default, it's easy for the user to change (some clients like gmpc allow to chose it in config dialog).
Also, we need to setup PulseAudio properly (network access to local sound devices).
Maybe we can also look if PulseAudio is installed and if a pulseaudio process is running? If yes, we select it as the default Audio Output for MPD, if not we keep ALSA.
But anyway, we should enable (i.e. uncomment in /etc/mpd.conf) both ALSA and PulseAudio outputs, so that in case the wrong one is selected by default, it's easy for the user to change (some clients like gmpc allow to chose it in config dialog).
Also, we need to setup PulseAudio properly (network access to local sound devices).
Just a suggestion.