I have a setup with two windows PCs sharing one screen+keyboard+mouse. There is a physical KVM (keyboard/video/mouse) switch to switch between PCs.
I experience the issue when I listen to spotify on PC1 and switch to PC2 the music stops. When I switch back the song is running but without sound. Other applications still work with sound. When I go to the next song spotify shows the error "aktueller Titel kann nicht wiedergegeben werden" / Current track cannot be played). When I close and reopen spotify it works again.
I narrowed it down to it happening when I disconnect the DisplayPort cable from PC1 (that also happens when I switch on the KVM). However the audio is not transferred via DP but via a separate optic cable.
Any hints for settings to stop this unwanted behavior?
I just noticed I get a similar behavior with the Windows Groove audio player. So this is not a spotify issue but something in the way Windows handles audio devices. I'll research further, this can be closed.
Solved! There was an "AMD HD Audio device" which I believe is part of my ATI graphics card which for some reason was switched to for audio. I deactivated it and now it stays on the "Digital output optical" entry as it's supposed to.