Hello, I am doing an application in C# but I have a problem.
I need to show the volume status of the computer.
I created two pictures to show if the volume is muted or not.
I found this code but I get errors:

MMDeviceEnumerator devEnum = new MMDeviceEnumerator();
MMDevice defaultDevice = devEnum.GetDefaultAudioEndpoint(EDataFlow.eRender, ERole.eMultimedia);
defaultDevice.AudioEndpointVolume.Mute = true;

So here I will put a condition to say that if it is true show the mute picture and so on
but it doesn't recognize
like [http://imagesia.com/volume_198j4]
What I have tried:

I tried this code but it shows some errors.
I saw in some forums that I must put this:
using CoreAudioApi;
But also it shows errors.

Recommended Answers

All 3 Replies

Did you find out to know if it is muted ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.