-
Notifications
You must be signed in to change notification settings - Fork 1
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
Implement device enumeration for WASAPI driver backend #1
Conversation
LGTM, I don't know WASAPI so I can't attest on the quality of the platform code, though, I'll trust that it is correct. I'll wait before merging this, first to fix the compilation error issues, and also because there's a few changes I'm making to the main API (most of which we have discussed on Discord). |
I'll update CI for a Windows build as a separate PR once this is merged. Unless you want it as part of this one? |
bdae913
to
24f0f24
Compare
examples/enumerate.rs
Outdated
@@ -8,15 +8,15 @@ pub fn enumerate_devices<Driver: AudioDriver>(driver: Driver) -> Result<(), Box< | |||
for device_type in [DeviceType::Input, DeviceType::Output, DeviceType::Duplex] { | |||
eprint!("\t{device_type:?}:\t"); | |||
if let Some(device) = driver.default_device(device_type)? { | |||
eprintln!("{}", device.name()); | |||
eprintln!("{}", device.name().unwrap()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eprintln!("{}", device.name().unwrap()); | |
eprintln!("{}", device.name()?); |
examples/enumerate.rs
Outdated
} else { | ||
eprintln!("None"); | ||
} | ||
} | ||
|
||
eprintln!("All devices"); | ||
for device in driver.list_devices()? { | ||
eprintln!("\t{} ({:?})", device.name(), device.device_type()); | ||
eprintln!("\t{} ({:?})", device.name().unwrap(), device.device_type()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eprintln!("\t{} ({:?})", device.name().unwrap(), device.device_type()); | |
eprintln!("\t{} ({:?})", device.name()?, device.device_type()); |
Didn't see that message! It would be great to have the CI added here directly, makes it easier to validate the PR. |
No description provided.