feat(wasapi): auto-rerouting of default device streams#1183
feat(wasapi): auto-rerouting of default device streams#1183roderickvd wants to merge 5 commits intomasterfrom
Conversation
|
Happy to see the tiebreak in favour of updating I'd appreciate a Anyhow, I notice that this PR adds a notification listener for device switching, and wires it up for the stream; if you're doing this, you can skip the entire This would also mean that it would work on pre-Windows-8 installs. The reason I didn't do this is because I didn't feel comfortable doing the required refactoring for the stream (iirc), but you may be more empowered to do so (or, at least, Claude might 😆) |
Co-Authored-By: sidit77 <sidit77@gmail.com> Co-Authored-By: philpax <me@philpax.me>
173537a to
04624e9
Compare
Absolutely! Done. Should have done that in the first place.
Appreciate you reading along, and for those direct pointers to Chromium. If I understand well, that's a different mechanism indeed: it doesn't let the OS reroute, but does so manually in the run loop by tearing down and re-creating a stream. I am doubting whether that's what we want:
With Windows 8 from 2012 and Vista before it from 2007, I'd be OK with not supporting Vista and older. |
This takes all the work by @philpax from #1027 and @sidit77 before him with #754 to support seamless rerouting of default device streams. When it does, it fires an
ErrorKind::DeviceChangedevent on the error callback.Before, we were stuck in dependency hell.
windowsv0.59 and v0.60 are over a year old now, so for cpal v0.18 I think it's time to move on.As I'm not a Windows user myself, this PR was prepared with Claude Code in hand. Real-world verification necessary!
Supersedes:
ActivateAudioInterfaceAsyncwith virtual device IDs for default devices #1027windows-corecrate to allow usage of #[implement] macro #1169