Quantcast
Channel: NAudio
Viewing all articles
Browse latest Browse all 5831

New Post: How to get notified Wave In Device disabled or enabled at run time (in short volume manipulation)

$
0
0

Hi..

I am creating a user control which will support all functionality like we can enable,disable, Mute also we can change audio capture device volume..etc. and it should be synchronized with windows audio settings dialog (Mixer settings)

Please check following code. using this i am only getting volume and mute value.

 

foreach (var control in mixerline.Controls)
   {
                var audioControl = control as NAudio.Mixer.UnsignedMixerControl;
                if (audioControl != null)
                {
                    _volume = (int)audioControl.Percent;
                }

                var audioControl1 = control as NAudio.Mixer.BooleanMixerControl;
                if (audioControl1 != null)
                {
                    _isMute = audioControl1.Value;
                }
   }

 

Thanks in advanced.

NileshN


Viewing all articles
Browse latest Browse all 5831

Trending Articles