bugfix: make soft clipping default because it's the first in the enum

This commit is contained in:
Liam Kerr 2026-08-03 15:45:34 +01:00
parent e1274e7be7
commit 9acddeb29c

View file

@ -19,10 +19,10 @@ void Clipper::processStereo(const float *inLeft, const float *inRight,
float Clipper::clip(const float in) {
switch (mode_) {
default:
case kClipperModeHard: {
return std::fmin(std::fmax(in, -threshold_), threshold_);
}
default:
case kClipperModeSoft: {
float normalized = (in / threshold_) * 0.75f;
return std::tanh(normalized) * threshold_;