I was lucky enough to stumble upon this when looking for a way to switch my spatial audio settings, as any time you switch your audio output, windows likes to totally reset things. This is beautifully written, formatted and commented.

I’ve made some modifications to suit my own needs (removed windows sonic bc gross, added 32 192000 options and made that the default, and added the default format menu to the gui that pops up when you hit the hotkey)

My modifications here