sirWest / AudioSwitch

Switch between default audio input or output + change volume
Apache License 2.0
1.08k stars 87 forks source link

Error when using specific audio device #164

Open JDGallagher opened 4 years ago

JDGallagher commented 4 years ago

I'm posting the entire log, though the entries related to this device (i think) are the two most recent. Just got a scarlett 8i6 audio interface and AudioSwitch seems to crash whenever I switch to it.

Log Entry: 12/17/2016 5:58:00 PM

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: 6/17/2017 7:22:42 PM

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: 11/21/2017 7:23:39 PM

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: 11/26/2017 10:30:58 AM

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: 5/26/2018 11:45:43 PM

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/30/2020 11:35:24 AM

System.ArgumentOutOfRangeException: Requested range extends past the end of the array. at System.Runtime.InteropServices.Marshal.CopyToNative(Object source, Int32 startIndex, IntPtr destination, Int32 length) at System.Runtime.InteropServices.Marshal.Copy(Byte[] source, Int32 startIndex, IntPtr destination, Int32 length) at System.Drawing.Icon.BmpFrame() at System.Drawing.Icon.ToBitmap() at AudioSwitch.Classes.DeviceIcons.AddOverlay(Icon originalIcon, Image overlay) at AudioSwitch.Classes.DeviceIcons.Add(String iconPath) at AudioSwitch.Forms.FormSwitcher.RefreshDevices(EDataFlow renderType) at AudioSwitch.Forms.FormSwitcher..ctor() at AudioSwitch.Classes.Program.Main(String[] args)

Log Entry: 8/30/2020 11:37:11 AM

System.ArgumentOutOfRangeException: Requested range extends past the end of the array. at System.Runtime.InteropServices.Marshal.CopyToNative(Object source, Int32 startIndex, IntPtr destination, Int32 length) at System.Runtime.InteropServices.Marshal.Copy(Byte[] source, Int32 startIndex, IntPtr destination, Int32 length) at System.Drawing.Icon.BmpFrame() at System.Drawing.Icon.ToBitmap() at AudioSwitch.Classes.DeviceIcons.AddOverlay(Icon originalIcon, Image overlay) at AudioSwitch.Classes.DeviceIcons.Add(String iconPath) at AudioSwitch.Forms.FormSwitcher.RefreshDevices(EDataFlow renderType) at AudioSwitch.Forms.FormSwitcher..ctor() at AudioSwitch.Classes.Program.Main(String[] args)