Re: [LAD] Regarding amplifying a PCM frame

From: Drip Stone <dripstone.blendercn@email-addr-hidden>
Date: Tue Oct 27 2009 - 13:49:45 EET

Thank you for the reply. Finally I figure out the problem. The code is OK,
but I thought it should be louder. So when I was multiplying t by 2, I could
not hear the difference from my laptop speaker. But after multiplying PCM
data by 20, I heard a significant difference.

Best,
Dripsotne

On Tue, Oct 27, 2009 at 1:44 AM, Jens M Andreasen
<jens.andreasen@email-addr-hiddenwrote:

> 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?
>
>

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Tue Oct 27 16:15:02 2009

This archive was generated by hypermail 2.1.8 : Tue Oct 27 2009 - 16:15:02 EET