shithub: leaf

Download patch

ref: 6fc3c757567e540d8f78b58b8d77170f33533137
parent: 060cba0ab20f4dbe3009a5dadab17823aed3948e
author: Jeffrey Snyder <jeffsnyder@jeffreys-mbp.mynetworksettings.com>
date: Mon Aug 22 17:27:31 EDT 2022

removed unnecessary nan check

--- a/leaf/Src/leaf-filters.c
+++ b/leaf/Src/leaf-filters.c
@@ -875,11 +875,6 @@
     svf->ic1eq = (2.0f * v1) - svf->ic1eq;
     svf->ic2eq = (2.0f * v2) - svf->ic2eq;
     
-    if (isnan(svf->ic1eq))
-    {
-        return 0.0f;
-    }
-    
     return (v0 * svf->cH) + (v1 * svf->cB) + (svf->k * v1 * svf->cBK) + (v2 * svf->cL);
 }
 
@@ -1307,6 +1302,7 @@
     f->s2   = 0.0f;
     f->R2   = f->invG;
     f->R2Plusg = f->R2 + f->g;
+    f->g = tanf(PI * f->fc * f->invSampleRate);  // embedded integrator gain (Fig 3.11)
     tVZFilter_setBandwidth(vf,f->B);
     tVZFilter_calcCoeffs(vf);
 }