This is a really strange issue I encounter sporadically in Windows 10. Even freshly installing Windows and the issue will still occur. I use a Presonus Audiobox for my audio needs, so it is possible that the device itself might be the culprit or the drivers I am using.
The sound I hear is this distorted/pixelated sound which sounds like what Minecraft would sound like if it were in audio form. This fix I’ve discovered I can’t vouch it fixes it permanently, but it does work without having to restart your PC.
Right-click on the audio icon in the taskbar and select, “Open sound settings” or you can open the start menu and type, “Sound settings” to open it that way as well.
You should be greeted with a similar screen to this one. Select, “Device properties” for your broken audio output device. Then click on the right-hand link, “Additional device properties”
On the speaker properties window, choose the, “Enhancements” tab and select, “Disable all enhancements”, then click apply and ok. Your audio might possibly work now. This seems to work for me, but if your audio is still broken, it’s possible the issue might be something else.