shithub: leaf

Download patch

ref: 7ef615c8fb11e9ad87fdd22f33b050ba7cf5f41c
parent: d6b2366da9870c02f6aa7095a549ab9f3d5e7463
author: Matthew Wang <mjw7@princeton.edu>
date: Sat Jan 25 13:05:23 EST 2020

minor

--- a/LEAF/Src/leaf-analysis.c
+++ b/LEAF/Src/leaf-analysis.c
@@ -206,7 +206,7 @@
 void    tEnvPD_initToPool       (tEnvPD* const xpd, int ws, int hs, int bs, tMempool* const mp)
 {
     _tMempool* m = *mp;
-    _tEnvPD* x = *xpd = (_tEnvPD*) mpool_alloc(sizeof(_tEnvPD), &m->pool);
+    _tEnvPD* x = *xpd = (_tEnvPD*) mpool_allocAndClear(sizeof(_tEnvPD), &m->pool);
     
     int period = hs, npoints = ws;
     
@@ -875,7 +875,7 @@
 void    tPeriodDetection_initToPool  (tPeriodDetection* const pd, float* in, float* out, int bufSize, int frameSize, tMempool* const mp)
 {
     _tMempool* m = *mp;
-    _tPeriodDetection* p = *pd = (_tPeriodDetection*) mpool_alloc(sizeof(_tPeriodDetection), &m->pool);
+    _tPeriodDetection* p = *pd = (_tPeriodDetection*) mpool_allocAndClear(sizeof(_tPeriodDetection), &m->pool);
     
     p->inBuffer = in;
     p->outBuffer = out;
--- a/LEAF_JUCEPlugin/Source/MyTest.cpp
+++ b/LEAF_JUCEPlugin/Source/MyTest.cpp
@@ -87,7 +87,7 @@
     
     x = val * 3.5f + 0.5f;
     
-    a = val * tBuffer_getLength(&buff);
+    a = val * tBuffer_getBufferLength(&buff);
     
     DBG("start: " + String(a));
     
@@ -95,7 +95,7 @@
     
     y = val * 49.0f + 1.0f;
     b = val * 20.0f - 5.0f;
-    b = val * tBuffer_getLength(&buff);
+    b = val * tBuffer_getBufferLength(&buff);
     
     DBG("rate: " + String(b));