SPKitCompressor implements a setRatio(SPKitFloat value) to set the compression ratio to 1:value. With a value greater than one SPKitCompressor will compress the amplitude. A value less than one will make SPKitCompressor a signal expander. SPKitCompressor inherits a setInputAndEstimationTime() initialization function and a setThreshold() function from its base class, SPKitDynamicsProcessor.
SPKitCompressor implements a setRatio() function for setting the compression ratio and a scaleBuffer() function for scaling the amplitude of the input signal.
SPKitLimiter uses linear interpolation to scale the amplitude between two consecutive time windows. If the absolute maximum amplitude values of both windows are less than threshold, scaleBuffer() leaves the sampleBuffer unaffected.
Kai Lassfolk / University of Helsinki / kpl@elisir.helsinki.fi