Repository navigation
Add AudioClient::from_device_path - #94
Conversation
|
I think this function needs a different name. Despite being familiar with WASAPI's native API surface, I had to check the implementation to understand what this does, and still took a solid minute to make sense of the name afterwards. From an outside perspective I'd imagine this being pretty cryptic. Granted, WASAPI itself is partially do blame for that, but I'd probably just call it Also, this screams for using |
|
Thanks yeah the name wasn't great, I changed it to something better (I think). Looking at async, I realized there are quite a few things here that are not Send, that probably could be. I'll look into that first. |
|
Are you referring to the structs that wrap COM objects? I've dealt a lot with COMs apartment boundaries very recently and might know a thing or two about it |
|
Let's continue the |
Activates a client from a device interface path, such as the Id of a WinRT DeviceInformation, so a caller enumerating with WinRT needs no completion handler of their own. - New playsine_winrt example, which finds the device purely through WinRT. Its bindings for MediaDevice and DeviceInformation are generated by tools/bindings into examples/playsine_winrt/bindings.rs, and need windows-future and windows-collections as dev-dependencies. - Device tests for shared and exclusive streaming and the bare endpoint id error, and a test that a path with a nul is rejected. - The README interop section and the from_raw docs point to it.
e49df9f to
5a52b3b
Compare
Add
AudioClient::from_device_path, for devices found through WinRT.DeviceInformation.Id, and does theActivateAudioInterfaceAsynccall itselfplaysine_winrtexample, enumerating and picking the device with WinRT only, using bindings generated bytools/bindingsfrom_rawdocs point to itRelated to #69.