Hi all,
I am pretty new to JUCE and DSP.
I built a simple delay plugin which uses circular buffers.
I tried initializing a buffer on the heap with a pointer but it seemed pretty unstable and prone to crackles or worse. I thought perhaps somehow I was writing outside the buffer.
I thought this might be a reasonable solution to just declare an array as a private member of the audio processor class and initialize it to zero.
The plugin sounds lovely and I have sent it to a lot of friends ( 20 or more ) with different Operating Systems and DAWS but with one user it managed to crash his version of cubase on a new computer.
It sounds suspiciously like some sort of seg fault to me.
Do I really need to use a juce audio buffer class to do this sort of thing?
Can you run valgrind or something on an audio plugin?
If the array is initialized to zero ( I assume when the class is created ) do I need to do more to memset it or something in the prepare to play or constructor or both? Declare it in the constructor instead?
float mCircularBufferLeft[96000] = { };
float mCircularBufferRight[96000] = { };
float mCircularBufferLeftTwo[96000] = { };
float mCircularBufferRightTwo[96000] = { };
I tried using one buffer instead of 16 but that did crash my DAW.
It doesn’t seem to me like it is the amount of memory allocation that a modern computer would worry about.
Perhaps some more experienced C++ and JUCE users will explain to me how silly an idea this really is!
Thanks for you advice!
Sean