Buffer Definition


I am following one tutorial to build a simple synth, but when i build I have the following error:

I am sure that its comes from the part where the left and right channels are defined with pointers to the buffers. I share my code there in processor.cpp, its a synthesizer with two sine waves.

Is that approach correct? Sorry I am little bit new to C++ and the framework, I usually code in C. Any help and theory aorund will be appreciated.


You need to check that data.numSamples is greater than zero before doing any processing. If data.numSamples is zero than the input/output busses may not be connected. This special case (data.numSamples == 0) is for flushing parameter changes when the plug-in is not in a processing state.