Re: auto volume control
- From: "Chris P. [MVP]" <msdn@xxxxxxxxxxxx>
- Date: Mon, 3 Oct 2005 14:59:56 -0400
On Fri, 30 Sep 2005 07:46:02 -0700, xwskx wrote:
> I have some question about volume control. The problem is i am using a line
> in to record something using the two channels. One channel will record one
> person talking and the other channel will record another person. I have
> reached the stage of changing the left and right volume, but i need it to
> auto adjust so that both channels have the same output volume.
>
> ie. if(left is louder) adjust left lower or right volume higher.
>
> So i was wondering if i could use directx sound api to find the amplitude of
> the channels to make the nessary adjustments. Does anyone know how to open
> the line-in audio and find the amplitude.
There are no API's to find the amplitude, you will have to do this by your
own code. Trying to simply equalize the amplitudes would probably be a bad
idea, you need to go a little further and try to only determine the sample
amplitude peaks when someone is actually speaking, i.e. there is constant
change in the amplitudes.
Do some research on AGC (automatic gain control) algorithms. You can apply
the theory to just about any of the capture API's.
.
- Prev by Date: Re: File source filter
- Next by Date: Re: Playing primary buffer
- Previous by thread: Re: File source filter
- Next by thread: Re: Playing primary buffer
- Index(es):
Relevant Pages
|