-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
"System.NullReferenceException" in AudioSwitcher.AudioApi.CoreAudio.dll #40
Comments
In the other link you suggested to try the version 4, how can I do that? In NuGet in the VS2017 I see only the version 3.0.0.1 |
You can include pre-release versions, there's a checkbox at the top of the nuget window in VS. https://www.nuget.org/packages/AudioSwitcher.AudioApi.CoreAudio/4.0.0-alpha5 You can see all the versions down the bottom. |
Thank you for the link. I still get a few the exception messages when I set the Mic or Speaker to 100 but it's not an endless loop anymore |
The same exception messages? |
Yes I get this message a few times at the same time:
but then it stopps at least and is not printed in an endless loop. Unfortunately my catch (Exception ex) isn't working so I don't see any further informations. I don't know why this is so |
When I call this:
I get that message 13 times. this gives me an IOException "System.IO.IOException" in System.dll but nevertheless this seems to work Is it possible to loop through a list of all available speakers and change volume only for a special one? The same for the mirophones? I only want to change the volume of the extermal Mic & Speaker (both USB devices) and not the system devices |
Might be something to do with the realtek device. I can't replicate it. As long as it doesn't break anything I'm not too worried about it, the exceptions are probably being caught, and handled for a reason. You can try debugging the api project if you want to get more information.
|
I just debugged the error as I too have multiple ArgumentNullExceptions on startup, with the pre-release version. The error thrown is in the CoreAudioDevice.Internal.cs System.ArgumentNullException |
@MorGuux Are you able to share the audio devices you are running in your system? And the version of Windows? |
I wonder if the device doesn't have audio meter support, in which case it's not returning anything from the call to And to double check, these exceptions are being handled internally? They aren't an unhandled exception outside of the Api? |
Windows 10 Pro Version 10.0.16299 |
The exception is handled with a try catch, I just allowed VS to break on ArgumentNullExceptions |
Are there any disabled devices too? I wonder if it's trying to call that on a disabled/disconnected device and then throwing an exception. There's definitely a nicer way to handle this without throwing an exception too |
Yeah, one capture device, Stereo Mix. I've not tried with that enabled. |
There's plenty of disconnected devices, that'll never be connected again ;) |
I wonder if that's what is causing it. It would make sense if it is. The solution would be to null check the COM |
Yeah no problems |
I too am getting an endless loop of these messages. Is there a fix yet? |
Try updating to the latest pre-release version instead of the stable version. It doesn't have the endless loop bug, just a few on startup. |
Yup that fixes the loop bug. It doesn't seem to be specific to hardware persay but more likely driver as I never had this bug when developing my app but I recently did a fresh format and am starting fresh and now have it happen on the same hardware, all that I can imagine is different is some different drivers. |
Hi Guys, All of a sudden today I starting getting this issue when building new binaries. My binaries built from the exact same commit prior to encountering this problem work fine. Has anyone figured out what is causing the issue? |
I've got the same issue from time to time, strangely |
I'm using VS2017 on Windows 10. My WPF application is using the lastest version of this API and has a Realtek onboard sound card
I want to set the volume of the windows setting to max like that:
So far it's working but after the first call my CPU usage is increasing and I constantely receive this message in the VS2017 output window:
It's not stopping. What is wrong?
I'm using AudioSwitcher.AudioApi.CoreAudio. 3.0.0.1 And I have to problem with Win 7 and Win 10
My WPF application has as target framework .NET 4.5.2
The text was updated successfully, but these errors were encountered: