Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when accessing FriendlyName in devices - Failed unit tests #26

Closed
MichalisN opened this issue Jun 30, 2015 · 1 comment
Closed

Comments

@MichalisN
Copy link
Contributor

I run the tests and 2 of them fail. Those are in Wasapi project at MMDeviceEnumeratorTests. The tests are CanEnumerateDevicesInVista and CanEnumerateCaptureDevices.

I did some investigation, they both fail for the same reason, the MMDeviceEnumerator returns the devices but the ones with state DeviceState.NotPresent throw exception when FriendlyName is accessed. In the demo applications only Active devices are used so no exceptions there.

I did a fix to write (with Debug.WriteLine as it was) the name only on the ones with state different than NotPresent and the ID for the ones with state NotPresent. Let me know if the tests are valid with this change to submit a pull request.

@markheath
Copy link
Contributor

yes, that would be great, thanks

MichalisN added a commit to MichalisN/NAudio that referenced this issue Jul 2, 2015
markheath added a commit that referenced this issue Jul 2, 2015
Fixed issue #26 - Use device ID instead of FriendlyName in devices with state NotPresent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants