Re: Measure mic sound input
I suspect you might be able to do this using Mitovs AudioLab library, which is an excellent audio processing library.
I'm not 100% sure it is capable of measuring the input level though, but I would be surprised if it couldn't. I'll give it a try myself.
Re: Measure mic sound input
You're in luck Steve!
First download and install the library.
Then add an AudioIn component to your form, this will capture audio from your microphone.
Next add a VUMeter component to the form. Set its InputPin property to the AudioIn components OutputPin and voila!
Now all you must do is handle the VUMeters ValueChanged event, in which you could update a ProgressBar with the values given by the args object.
Thats how these components work, they can be plugged to eachother in a thousand different chains. If you'd like you could add an AudioOut component to the end of the chain so you'll output the sound from the mic aswell. I think you get the idea, this is a very powerful library.
Re: Measure mic sound input
Thanks.
I will give that a try. I don't need something too complicated. Just something simple. Seems like you have hit the nail on the head.
I will try it first thing tomorrow.
Re: Measure mic sound input
Atheist, would this library allow me to detect sound as well? I am wanting to detect sound from one program to adjust the volume of another program. Can this be done?
Re: Measure mic sound input
Quote:
Originally Posted by
stateofidleness
Atheist, would this library allow me to detect sound as well? I am wanting to detect sound from one program to adjust the volume of another program. Can this be done?
Are you saying you want to detect the sound that is outputted from a specific program? Not detect any sound played on a specific audio card?
Re: Measure mic sound input
That is correct. I want to detect any incoming sound from a specific program and have this adjust the volume of all other programs. (basically giving the "specific" program's sound precedence and making it the loudest.
a semi "mute" of all other applications if the specific one is making sound
Re: Measure mic sound input
I dont believe its able to do that. However since Windows Vista is able to enumerate the processes that is playing audio in the "Volume Mixer", there might be some API that could help you. Although thats another story - and another thread :)
Re: Measure mic sound input
Hi Atheist,
can it measure the frequency also other than audio signal level??
regards,
Simon