Comment 5 for bug 1637786

Revision history for this message
JosepMa (josepma) wrote :

I believe we are not on the same page.

As I understand libsndfile option of normalize, it simply means that it translates the full scale. It does not try to guess which is the peak value.

That is, if normalization is not selected, in order to get a 16 bit PCM audio with -32768 to 32767 range, the floating point data provided should be -32768.0 to 32767.0, whereas if normalization is used, that same PCM range is obtained from a floating point data between -1.0 to 1.0.

And that's it, no more.

So, what if the floating point data is -1.3 to 1.2 due to excessive gain? Then you need to tell it to clip at full scale. And that's what I've just changed in the code.