Closed olilarkin closed 11 months ago
Thanks Oli!
I have moved the dynamic allocation to OnReset()
in 0d5f0a6.
I was doing this allocation to create an audio buffer, so I am now using GetBlockSize()
to determine the buffer length. I believe this is the correct way to do it?
That looks better :-)
I would suggest using std::vector
Here is an example of how i do it using the WDL_TypedArray and WDL_Ptrilist. (you can do similar things with std::vector) https://gist.github.com/olilarkin/1103fb82de3ace6d4c94660d534100d9
Ok great yep, a lingering effect of my background in C. This should be better 3eea759
This is looking really nice now!
I just noticed this though:
https://github.com/michaelholmes4/NNComp/blob/d700d83872e5aa5e5001dd5d14998219b87728f5/Plugin/NNComp/NNComp.cpp#L116
It would be better to preallocate as much memory as you might need in OnReset(), rather than allocating and freeing memory in ProcessBlock()