The relevant sox code is here: https://sourceforge.net/p/sox/code/ci/master/tree/src/dither.c
Noise shaping would be a nice, but it requires significant more CPU, so it should be optional.
libav / ffmpeg has also a dither solution: http://code.metager.de/source/xref/ffmpeg/libavresample/dither.c
This is the Portaudio Implementation: https://github.com/EddieRingle/portaudio/blob/9eb5f0b3d820a81d385504d9c54534abbeea1099/src/common/pa_converters.c#L673 The issue with that is that the noise is calculated on the fly and the high pass to the noise is questionable.
The relevant sox code is here: /sourceforge. net/p/sox/ code/ci/ master/ tree/src/ dither. c
https:/
Noise shaping would be a nice, but it requires significant more CPU, so it should be optional.
libav / ffmpeg has also a dither solution: code.metager. de/source/ xref/ffmpeg/ libavresample/ dither. c
http://
This is the Portaudio Implementation: /github. com/EddieRingle /portaudio/ blob/9eb5f0b3d8 20a81d385504d9c 54534abbeea1099 /src/common/ pa_converters. c#L673
https:/
The issue with that is that the noise is calculated on the fly and the high pass to the noise is questionable.