Page 1 of 1

Control input microphone volume with TrackBar * Locked

Posted: Sun Feb 14, 2010 12:31 am
by tvs praveen
i, I want to know how to control input microphone`s volume with TrackBar

Re: Control input microphone volume with TrackBar

Posted: Mon Feb 15, 2010 4:42 pm
by CodenStuff
Hello,

In your project make a reference to the attached DLL file and then add a trackbar to your form and use the following code:
Code: Select all
Imports WaveLib.AudioMixer
Place this below "Public Class Form"
Code: Select all
  Dim mMixers As New Mixers
Place this code inside the "Form_Load" event:
Code: Select all
   mMixers.Recording.Lines.GetMixerFirstLineByComponentType(MIXERLINE_COMPONENTTYPE.SRC_MICROPHONE).Selected = True
        TrackBar1.Minimum = 0
        TrackBar1.Maximum = 100
        TrackBar1.Value = 20
Place this in the "TrackBar_Scroll" event:
Code: Select all
           mMixers.Recording.Lines.GetMixerFirstLineByComponentType(MIXERLINE_COMPONENTTYPE.SRC_MICROPHONE).Volume = TrackBar1.Value

I dont know if it works properly because I dont have a microphone at the moment to test it. If it doesnt please wait for someone else to respond.

Download DLL:
WaveLibMixer.zip
Thank you.

Re: Control input microphone volume with TrackBar

Posted: Mon Feb 15, 2010 7:19 pm
by tvs praveen
Thanks a lot codenstuff wahooo;


Its working well! :D