shithub: leaf

Download patch

ref: ca5234ca4dc13b93df01f2ca18117445a68871b6
parent: 7156be01b28b4d4c7d688277a6db209526c5b43d
author: Matthew Wang <mjw7@princeton.edu>
date: Tue Feb 4 11:39:02 EST 2020

fix error in dattorro init

--- a/LEAF/Src/leaf-reverb.c
+++ b/LEAF/Src/leaf-reverb.c
@@ -389,7 +389,6 @@
     
     r->size_max = 2.0f;
     r->size = 1.f;
-    r->t = r->size * leaf.sampleRate * 0.001f;
     r->frozen = 0;
     // INPUT
     for (int i = 0; i < 4; i++)
@@ -417,6 +416,7 @@
 {
     _tDattorroReverb* r = *rev = (_tDattorroReverb*) leaf_alloc(sizeof(_tDattorroReverb));
     float size_max = 2.0f;
+    r->t = r->size * leaf.sampleRate * 0.001f;
     // INPUT
     tTapeDelay_init(&r->in_delay, 0.f, SAMP(200.f));
     tOnePole_init(&r->in_filter, 1.f);
@@ -502,6 +502,7 @@
     _tMempool* m = *mp;
     _tDattorroReverb* r = *rev = (_tDattorroReverb*) mpool_alloc(sizeof(_tDattorroReverb), &m->pool);
     float size_max = 2.0f;
+    r->t = r->size * leaf.sampleRate * 0.001f;
     // INPUT
     tTapeDelay_initToPool(&r->in_delay, 0.f, SAMP(200.f), mp);
     tOnePole_initToPool(&r->in_filter, 1.f, mp);