The Bug
If Minecraft is currently playing music or any other sound (most noticeable with the sounds of ender dragon dying, totem activating, enderman crying), switching audio devices would make it stop. Affects both in game and title screen.
In the video, you cannot hear the sound of the totem activating because I unplugged my headphones as soon as the totem is activated, but you can still hear the husk since two sounds are generated every second.
This also means any currently playing music will stop after an audio device switch.
Reproduce
Do /playsound minecraft:music.dragon voice @p
Switch audio devices
❌ Notice the music stops
Expected Result
The sounds would continue playing and wouldn't stop when switching audio devices
Related issues
is duplicated by
Comments


Try the workaround in MC-44055.

this was actually already a thing as when you switch or reload resource packs all sound, including(and most notably) background music, stops.
If you are on 1.17.1 and below, this only affects snapshot 21w37a and above as only those versions allow for switching audio devices at all. It is in fact impossible to switch audio devices in earlier versions, which sounds like what you described.