MusicPlayerDaemon / MPD

Music Player Daemon
https://www.musicpd.org/
GNU General Public License v2.0
2.11k stars 338 forks source link

Modify audio output device system/master volume on Windows #2005

Open zebranine opened 3 months ago

zebranine commented 3 months ago

Feature request

First post here so congratulations and thanks for this awesome offering.

It seems that volume commands from MPD clients (MALP, MPDCtrl) influence only the MPD output volume and not the output device's system/master volume level on the Windows host machine. If there is a way to do this I have not found it.

Since we are using the MPD server machine as an HTPC, the device volume may be left at an arbitrarily low level by the last user and this then caps the output from MPD. Only a manual adjustment of the device volume via the usual Windows controls resolves the issue.

I have various workarounds but direct setting of the Windows device volume by MPD would be ideal.

Thanks for your time.

MaxKellermann commented 3 months ago

I don't understand what you are doing, partly because you did not say anything about your setup, and partly because I have never used Windows, and I don't know what "system/master volume" is.

zebranine commented 3 months ago

I have a Windows 11 PC hosting MPD as a service, various clients (Windows, Android).

Client volume changes seem to modify only the MPD application volume, rather than the host audio device volume at the operating system level.

This means that if the Windows audio device used by MPD is set at 25% volume (in the Windows mixer), MPD can only reach maximum 25% of potential system volume even when it is set internally to 100% volume.

The OS mixer volume overrides the MPD application volume. This could be overcome if MPD set the Windows mixer level for the audio device directly.

Screenshot of client displaying MPD vol vs OS audio device vol:

3
zebranine commented 3 months ago

Found a partial solution.

MPD will control Windows Mixer master volume if mpd.conf audio_output settings specify the following:

type "wasapi" exclusive "yes"

This, however, means no other programs can use the audio device, so not ideal.