Open mm1711 opened 2 years ago
Thank you for your input. I recently looked up how to best manage summing channels with minimal clipping. I am working on a re-write. mixer.c was updated but untested, as I have a LOT of work ahead of me. Debugging the master branch is too cumbersome, so I am slowly re-writing everything, hopefully improving it.
In mixdown.c the constant MAX_SAMPLE_VALUE is used to limit the sum of the track buffer and new in buffer values. With the definition of MAX_SAMPLE_VALUE as UINT16_MAX this cannot work. JACK delivers the audio samples as floating point numbers in the range of -1.0 to +1.0. So you should limit the sum to 1.0 (0dbFS) or 0,7071 (-3dBFS).