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

Implement device enumeration for WASAPI driver backend #1

Closed
wants to merge 2 commits into from

Conversation

geom3trik
Copy link
Collaborator

No description provided.

@SolarLiner
Copy link
Owner

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).

@geom3trik
Copy link
Collaborator Author

geom3trik commented Jul 25, 2024

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?

@geom3trik geom3trik force-pushed the wasapi branch 3 times, most recently from bdae913 to 24f0f24 Compare July 27, 2024 16:28
@@ -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());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eprintln!("{}", device.name().unwrap());
eprintln!("{}", device.name()?);

} 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());
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
eprintln!("\t{} ({:?})", device.name().unwrap(), device.device_type());
eprintln!("\t{} ({:?})", device.name()?, device.device_type());

@SolarLiner
Copy link
Owner

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?

Didn't see that message! It would be great to have the CI added here directly, makes it easier to validate the PR.

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

Successfully merging this pull request may close these issues.

2 participants