xenolightning / AudioSwitcher

.NET Library which facilitates interacting with Audio Devices on Windows
Microsoft Public License
248 stars 53 forks source link

NET Standard 2.0 support #48

Closed mojoe-playground closed 4 years ago

mojoe-playground commented 4 years ago
xenolightning commented 4 years ago

Wow very cool - Looks like there wasn't any changes required other than configuration?

Are you looking to get this working for .net core using these changes?

And does it work in .net core 3?

mojoe-playground commented 4 years ago

Yeah, it compiled just fine without any source code modifications. Didn't touch the scripting assemblies, but the AudioSwitcher.AudioApi and AudioSwitcher.AudioApi.CoreAudio assemblies are working in net core.

I had a console program using the library to switch audio devices and set their volume, Recently started to convert my hobby programs to net core and .NET portability analyzer said the library can run in core, I thought I try to convert it. My program runs well in core, but it is using only a small part of the library.

The existing tests for the AudioApi and CoreAudio assemblies are all pass when running in net core 3; just run the tests in core 2.0, it also passed all tests.