haalet.blogg.se

How to increase microphon gain windows 10
How to increase microphon gain windows 10





how to increase microphon gain windows 10

Then, with this second attempt using mixerOpen(out mixer, 0, 0, 0, 0), the code doesn't return a failure but the mic gain is unaffected. This is done because on XP, in the first call to GetVolumeControl (refer to site above for that code), the call to mixerGetLineControlsA() fails with XP systems returning MIXERR_INVALCONTROL. Note the "second attempt" to call GetVolumeControl(). Throw new Exception("SetMicVolume/SetVolumeControl() failed") Rc = SetVolumeControl(mixer, volCtrl, vVolume) VVolume = ((int)((float)(volCtrl.lMaximum - volCtrl.lMinimum) / 100.0F) * percentage) Throw new Exception("SetMicVolume/GetVolumeControl() failed") Rc = GetVolumeControl(mixer, MIXERLINE_COMPONENTTYPE_SRC_MICROPHONE, type, out volCtrl, out currentVol) Int type = MIXERCONTROL_CONTROLTYPE_VOLUME MixerOpen(out mixer, mxid, 0, 0, MIXER_OBJECTF_WAVEIN) MIXERCONTROL volCtrl = new MIXERCONTROL() public static void SetMicVolume(int mxid, int percentage) The mixer code I started with comes from here:Īnd it works, but is written to adjust speaker volume. So, I managed to find some mixer code that I've also pulled in andĪccess through pInvoke and that allows me to adjust microphone volume, but only on my W7 PC. The problem is that for whatever reason, that API does not allow me to adjust microphone I'm also able to adjust speaker (WaveOut) volume with that API. I have a C# application, with all the pInvoke hooks to talk to the waveXXX API, and I'm able to do capture and play back ofĪudio with that. First, note that I know there are a few questions like this already posted however theyĭon't seem to address the problem adequately.







How to increase microphon gain windows 10