Re: [LAD] Regarding amplifying a PCM frame

From: Jörn Nettingsmeier <nettings@email-addr-hidden-hochschule.de>
Date: Mon Oct 26 2009 - 11:08:20 EET

On 10/26/2009 07:33 AM, Drip Stone wrote:
> Hi everybody,
>
> I have a question regarding amplifying a PCM frame. For each frame, I
> get a float number, and multiply this number by 2, and then output
> frames to alsa one by one using function snd_pcm_writei. But the wav
> file sounds the same to me, nothing gets amplified. Could anyone explain
> this to me? I appreciate your help!

you should hear an amplification by roughly 6dB... what might happen is
this: your file already has a peak at 1.0f. after your operation, it
will peak at 2.0f, which your DAC can't handle. so the file will have to
be clamped between -1.0f and 1.0f, effectively undoing your gain
operation. just a guess.

or you might be expecting the wrong thing... times two doesn't feel
"twice as loud". then again, +6dB is quite audible in any case.

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Mon Oct 26 12:15:04 2009

This archive was generated by hypermail 2.1.8 : Mon Oct 26 2009 - 12:15:04 EET