[LAD] Regarding amplifying a PCM frame

Jens M Andreasen jens.andreasen at comhem.se
Tue Oct 27 08:44:54 UTC 2009


On Mon, 2009-10-26 at 17:53 -0700, Drip Stone wrote:

>         
>         I pasted all the code at http://pastebin.com/m7fdf0957.

OK! Aside from the C++ style of declaring iterators, I just made this
change in (or around) line 126 to raise left channel by 6 dB:

-8<------------------------------------------
 //left
	int i;
        for (i = 0; i < frames; i++ )
        {
            float t = 0;
	    int j;
            if ( left )
            {
                t = *((float*)&(fbuffer[pos+i*4]));
		t *= 2.0f; // <-- Works like a charm?
...

---------------------------8<---------------------

What was the problem now again?




More information about the Linux-audio-dev mailing list