ref: 62e2951b664a111eb7f82de959e5c1ee8466cd75
parent: b48e5eb9db10d682829e6953b75f8b111bdbf292
author: Matthew Wang <mjw7@princeton.edu>
date: Mon Feb 22 08:26:06 EST 2021
don't do calculation in oversampler setRatio if ratio is already set
--- a/leaf/Src/leaf-distortion.c
+++ b/leaf/Src/leaf-distortion.c
@@ -312,8 +312,8 @@
{
_tOversampler* os = *osr;
+ if (ratio == os->ratio) return;
if (ratio > os->maxRatio) ratio = os->maxRatio;
-
if (ratio == 1) os->ratio = ratio;
else if (ratio == 2 || ratio == 4 || ratio == 8 ||
ratio == 16 || ratio == 32 || ratio == 64)