How to detect when Windows default Audio device changes?

Hi,
I’m trying to detect when the user (through Windows menus) changes the default audio device. I tried this:

AudioSettings.OnAudioConfigurationChanged += myAudioChangeHandler;

But “myAudioChangeHandler()” is not called when I change the windows audio default device from headphones to speakers (or vice versa).

To verify that my change handler was registered correctly, in my Unity project I called manually called AudioSettings.Reset() and indeed the handler executed. However, again, when I externally changed the audio output source, my handler was not invoked.

Any pointers on what I am doing wrong are much appreciated.

Thanks,
Davison

PS. Running Windows 10 and Unity 2017.1.1f1.

Hey, have you made any progress on this? I’m trying to write a script (probably powershell or autoit) that detects when the default device is changed (due to USB device being plugged in for example) and resets this to what I manually assigned previously.