MusicPlayerDaemon / MPD

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

MPD does not track audio device changes on Windows #1408

Open ctoth opened 2 years ago

ctoth commented 2 years ago

Bug report

Describe the bug

If I have an output configured like:

audio_output {
    name "Windows Audio"
    type "winmm"
    device "Headphones (4- ATR2100x-USB Microphone)"
}

And I start MPD, it plays to the selected device.
If my audio devices then change, for instance by plugging in USB headphones, MPD will output to another device arbitrarily.

Expected Behavior

The daemon should continue outputting to the configured audio device.

Actual Behavior

The daemon outputs to another, often random audio device.

Version

Music Player Daemon 0.23.5 (v0.23.5) Copyright 2003-2007 Warren Dukes warren.dukes@gmail.com Copyright 2008-2021 Max Kellermann max.kellermann@gmail.com This is free software; see the source for copying conditions. There is NO warranty; not even MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Database plugins: simple proxy

Storage plugins: local nfs curl

Decoders plugins: [vorbis] ogg oga [oggflac] ogg oga [flac] flac [opus] opus ogg oga [dsdiff] dff [dsf] dsf [hybrid_dsd] m4a [openmpt] mptm mod s3m xm it 669 amf ams c67 dbm digi dmf dsm dtm far imf ice j2b m15 mdl med mms mt2 mtm nst okt plm psm pt36 ptm sfx sfx2 st26 stk stm stp ult wow gdm mo3 oxm umx xpk ppm mmcmp [modplug] 669 amf ams dbm dfm dsm far it med mdl mod mtm mt2 okt s3m stm ult umx xm [wildmidi] mid [ffmpeg] 16sv 3g2 3gp 4xm 8svx aa3 aac ac3 adx afc aif aifc aiff al alaw amr anim apc ape asf atrac au aud avi avm2 avs bap bfi c93 cak cin cmv cpk daud dct divx dts dv dvd dxa eac3 film flac flc fli fll flx flv g726 gsm gxf iss m1v m2v m2t m2ts m4a m4b m4v mad mj2 mjpeg mjpg mka mkv mlp mm mmf mov mp+ mp1 mp2 mp3 mp4 mpc mpeg mpg mpga mpp mpu mve mvi mxf nc nsv nut nuv oga ogm ogv ogx oma ogg omg opus psp pva qcp qt r3d ra ram rl2 rm rmvb roq rpl rvc shn smk snd sol son spx str swf tak tgi tgq tgv thp ts tsp tta xa xvid uv uv2 vb vid vob voc vp6 vmd wav webm wma wmv wsaud wsvga wv wve [gme] ay gbs gym hes kss nsf nsfe rsn sap spc vgm vgz [pcm]

Filters:

Tag plugins:

Output plugins: null jack httpd snapcast recorder winmm wasapi

Encoder plugins: null vorbis opus lame wave flac

Input plugins: file curl ffmpeg nfs

Playlist plugins: extm3u m3u pls xspf asx rss flac cue embcue

Protocols: http:// https:// nfs://

Other features: ipv6 tcp

XxnittanixX commented 1 year ago

dont specify audio devices

ctoth commented 1 year ago

dont specify audio devices

If I wanted to use the default output, I would use the default output. In my particular case I am sharing the speakers of my desktop with HomeAssistant. I want speech and other HA output to go to the speakers. Not to the USB headset which may optionally be plugged in. The way to do this is by specifying audio devices. This works, until the audio device index changes.