xenolightning / AudioSwitcher

.NET Library which facilitates interacting with Audio Devices on Windows
Microsoft Public License
248 stars 53 forks source link

Fix: "IsDefaultDevice" property may be incorrect. #52

Closed jsakamoto closed 4 years ago

jsakamoto commented 4 years ago

Sometimes, the "IsDefaultDevice" property returns incorrect value.

In my case, the "IsDefaultDevice" property of all capture devices on my PC are always false.

This is because when determining whether a device is the default device, it depends on the DeviceType property, but it was determined before the DeviceType property was determined.

Therefore, I exchanged the code steps to determining whether a device is the default device after DeviceType property was determined.

P.S. Thank you for your great works! 👍

xenolightning commented 4 years ago

Great find - and make total sense - thanks for the PR!