Normalizer stereo imaging and performance improvements
Previously, the normalizer integrator and peak were recalculated as if the samples were a mono stream. If actually one channel required limiting and the other not, this could cause nervousness in the stereo imaging.
This PR changes the normalizer to:
- calculate the integrator and peak for each channel individually
- then couple the left/right channel by using the limit gain of each interleaved pair of samples
- be faster by optimizing the hot code path and reducing the number of branches
Again, please test this for me as I don't have a Spotify account anymore. I ported it from pleezer with my permission. My "go to" track to test limiting is "Blumine" by Mahler on "Masterpieces in Miniature".
So I used the state of the branch for a bit (with normalization enabled) and it seems to not have (at least for me) noticeable interference or audio spikes. I will test it for a day more and then we could probably get it merged :D
No prob I'll make some minor changes anyway.