Skip to content

Conversation

@Sin-tel
Copy link
Contributor

@Sin-tel Sin-tel commented Dec 6, 2025

Small fix: changes the backend-specific error from a cryptic "0x8889000A" to "The device is already in use.".

@Sin-tel Sin-tel changed the title Handle AUDCLNT_E_DEVICE_IN_USE for WASAPI WASAPI: Handle AUDCLNT_E_DEVICE_IN_USE Dec 6, 2025
@roderickvd
Copy link
Member

Hmm. I'm not sure about the custom string. Why not have it also return DeviceNotAvailable?

@Sin-tel
Copy link
Contributor Author

Sin-tel commented Dec 7, 2025

Currently docs say that DeviceNotAvailable means e.g. the device is literally unplugged. In my use-case I want to display something helpful like "Another application is using this device." to the user.

@roderickvd
Copy link
Member

You could argue that it's another kind of "not available". If important to discern between the two then we could consider returning a variant, or heck, even consider some kind of std::io::Error.

@roderickvd roderickvd merged commit fb0fdd1 into RustAudio:master Dec 8, 2025
30 checks passed
@roderickvd
Copy link
Member

Thanks, merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants