[LAD] Regarding amplifying a PCM frame
Victor.Lazzarini at nuim.ie
Mon Oct 26 10:38:46 UTC 2009
Well if the audio was clipped, there would probably be some audible
Perhaps if a code fragment was posted we could give a more informed
On 26 Oct 2009, at 09:08, Jörn Nettingsmeier wrote:
> 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
>> this to me? I appreciate your help!
> you should hear an amplification by roughly 6dB... what might happen
> 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 at lists.linuxaudio.org
More information about the Linux-audio-dev