Retroarch randomly lose sound

I’m on Win10. When playing games (especially DOS games with Dosbox Pure core), it frequently lose sound. I can restore it via toggle Menu (F1 key) 1~n times, but the sound would lose again soon and I have to do it again. Other way to trigger this issue is by toggle the window size, it will make the sound either on or off. It’s really annoying. What could be the cause??? I use the xaudio driver which is the only one that works perfectly fine while it’s working.

Oh, by the way, the most terrible game that have this problem is Command & Conquer.