You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After migrating from NAudio.CoreAudioApi to AudioSwitcher.AudioApi, I found another regression in my application. I can no longer view properties for devices that are not connected to the system, due to these 3 lines:
//Don't try to load properties for a device that doesn't exist
if(State==DeviceState.NotPresent)
return;
Removing these lines immediately allow the library to behave as desired for my project. I doubt you'd accept that as a PR though. It should be some kind of setting that's stored in the CoreAudioController when it's created. I don't see a pattern in the library for how you would implement something like that. An optional parameter in the CoreAudioController constructor? Containing just that flag? Or wrapped in a new CoreAudioControllerSettings struct? Let me know what you think, and I'll work on the implementation.
Thanks
The text was updated successfully, but these errors were encountered:
Sypwn
added a commit
to Sypwn/WinAudioAssistant
that referenced
this issue
Dec 6, 2023
The solution to this could be shared with issue #72.
By allowing the app to specify which endpoint states it's concerned with, the performance impact of including properties for not present devices would be mitigated. Alternatively, we could create a CoreAudioControllerSettings struct to include both new settings.
I never thought about the use case of pulling properties from devices that aren't present in the system.
I guess it makes sense, since the device doesn't have to be present to pull them name etc...
I'm not sure about changing the constructor to optimize the loading of devices. There's some pretty gnarly performance issues with the devices in it's current state.
I want to simplify the library and get away from a lot of the inherent issues, so I'm not sure #72 is the right solution there
After migrating from NAudio.CoreAudioApi to AudioSwitcher.AudioApi, I found another regression in my application. I can no longer view properties for devices that are not connected to the system, due to these 3 lines:
AudioSwitcher/AudioSwitcher.AudioApi.CoreAudio/CoreAudioDevice.Internal.cs
Lines 94 to 96 in 27d4bf5
Removing these lines immediately allow the library to behave as desired for my project. I doubt you'd accept that as a PR though. It should be some kind of setting that's stored in the CoreAudioController when it's created. I don't see a pattern in the library for how you would implement something like that. An optional parameter in the CoreAudioController constructor? Containing just that flag? Or wrapped in a new CoreAudioControllerSettings struct? Let me know what you think, and I'll work on the implementation.
Thanks
The text was updated successfully, but these errors were encountered: