Comment 4 for bug 1637786

Revision history for this message
Daniel Schürmann (daschuer) wrote :

The libsndfile normalization is IMHO heavily broken by design.

It is up to the user to level the gain of the recoded samples before he starts recording.
All normalization during the recording does not reflect the original samples passed to the sound card, which is probably intended. This means, clipping at the sound-card should IMHO be recorded to the file as it is. The libsndfile normalization would apply an instant gain to the signal, which introduces a click sound and leads to a recording where the first half is louder than the second half.

You may apply the clipping in
EngineSideChain::run() or
EngineSideChain::writeSamples()
to get around the const issue

This would prevent to record samples above 1 in a float recording
So finally a second buffer seams to be required.