shithub: leaf

Download patch

ref: 09c6e97e29d927483135b5e159318ed1f97b6f30
parent: afed9908a7dd428324cac0048ed3d94451022b44
author: Matthew Wang <mjw7@princeton.edu>
date: Tue Sep 22 10:55:12 EDT 2020

tape delay tick fix

--- a/leaf/Src/leaf-delay.c
+++ b/leaf/Src/leaf-delay.c
@@ -796,9 +796,7 @@
 
     d->idx += d->inc;
 
-    int i = (int)d->idx;
-    float f = d->idx - (float)i;
-    if (d->idx >= d->maxDelay) d->idx = f;
+    while (d->idx >= d->maxDelay) d->idx -= d->maxDelay;
 
     if (d->lastOut)
         return d->lastOut;