On Wed Jun 28 06:21:26 2023 +0000, Huw Davies wrote:
It's rather difficult to test on Windows since the failures generally shouldn't happen. I'd probably move the `NULL` init to the beginning. Also, I'd probably use `E_UNEXPECTED` for the `dataflow` error - again it's hard to test since this really shouldn't fail.
Isn't this function a "reflection" of `IMMDeviceEnumerator::GetDefaultAudioEndpoint()`?
I tried passing a value of `2` (invalid) on Windows and got `E_INVALIDARG`.