Changing system audio preferences in Windows while app running breaks the audio

Hello. I’m working on a JUCE Windows app using the internal mic/speakers of a laptop.
It turns out that changing some system audio preferences (e.g. volume, enhancement etc… in the Sound Control Panel) while the app is running might lead to some problems. E.g., changing the system volume for the internal loudspeaker while the app is running causes the loudspeaker to stop working!

This is not happening only with my app; the same happens if I’m running the juce DemoRunner.
While I’d expect something going wrong if the user changes system audio preferences related to the Exclusive mode or even the audio enhancements, triggering such a problem after changing the system gain for the loudspeakers doesn’t seem right.

That’s why I tried testing with different Windows audio driver versions and I found out that such an issue arose around last year update of my Realtek drivers (Realtek HD Audio version 6.0.2947.1 [10/5/2021]).
Previous audio driver versions that I tested and did not cause such an issue (at least for changes in the loudspeaker gain) include:

  • Realtek HD Audio version 6.0.9215.1 [8/3/2021]
  • Realtek HD Audio version 6.0.8716.1 [5/28/2019]
  • Realtek HD Audio version [4/7/2016]
  • Microsoft High Definition Audio Driver - 10.0.19041.264 [05/09/2020]

Not sure what the JUCE people can do with such info, as I understand the problem here is Realtek, but just wanted to let you know :sweat_smile:


Quick update: it seems that the latest version of the Realtek HD drivers my Win10 laptop installed, namely Realtek HD Audio version 6.0.9350.1 [5/10/2022], are back being compatible with JUCE and do not break the system audio if one changes the system speaker volume while a JUCE app is running.

Not sure what happened but I suppose this was some fixing on the Realtek side.