Seems like the latest major Windows 10 broke this.
Windows 10 1903 (18362.267)
System.Runtime.InteropServices.COMException (0x80070490): Element not found. (Exception from HRESULT: 0x80070490)
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at AudioSwitch.CoreAudioApi.MMDeviceEnumerator.GetDefaultAudioEndpoint(EDataFlow dataFlow, ERole role)
at AudioSwitch.Controls.VolumeBar.RegisterDevice(EDataFlow RenderType)
at AudioSwitch.Forms.FormSwitcher..ctor()
at AudioSwitch.Classes.Program.Main(String[] args)
-------------------------------
Log Entry: 8/11/2019 10:47:28 AM
System.Runtime.InteropServices.COMException (0x88890008): Exception from HRESULT: 0x88890008
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at AudioSwitch.CoreAudioApi.MMDevice.GetAudioEndpointVolume()
at AudioSwitch.Controls.VolumeBar.RegisterDevice(EDataFlow RenderType)
at AudioSwitch.Forms.FormSwitcher..ctor()
at AudioSwitch.Classes.Program.Main(String[] args)
-------------------------------
Log Entry: 8/11/2019 10:48:50 AM
System.Runtime.InteropServices.COMException (0x88890008): Exception from HRESULT: 0x88890008
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at AudioSwitch.CoreAudioApi.MMDevice.GetAudioEndpointVolume()
at AudioSwitch.Controls.VolumeBar.RegisterDevice(EDataFlow RenderType)
at AudioSwitch.Forms.FormSwitcher..ctor()
at AudioSwitch.Classes.Program.Main(String[] args)
-------------------------------
Log Entry: 8/11/2019 10:50:12 AM
System.Runtime.InteropServices.COMException (0x88890008): Exception from HRESULT: 0x88890008
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at AudioSwitch.CoreAudioApi.MMDevice.GetAudioEndpointVolume()
at AudioSwitch.Controls.VolumeBar.RegisterDevice(EDataFlow RenderType)
at AudioSwitch.Forms.FormSwitcher..ctor()
at AudioSwitch.Classes.Program.Main(String[] args)
-------------------------------
Log Entry: 8/11/2019 10:52:32 AM
System.Runtime.InteropServices.COMException (0x88890008): Exception from HRESULT: 0x88890008
at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo)
at AudioSwitch.CoreAudioApi.MMDevice.GetAudioEndpointVolume()
at AudioSwitch.Controls.VolumeBar.RegisterDevice(EDataFlow RenderType)
at AudioSwitch.Forms.FormSwitcher..ctor()
at AudioSwitch.Classes.Program.Main(String[] args)
-------------------------------
Seems like the latest major Windows 10 broke this.
Windows 10 1903 (18362.267)