I'm building a simple synth and everything seems to work fine but I get a strange behavior in Logic Pro X.
Here is what I'm doing:
- I load the plugin
- Play a few notes
- I remove the plugin
- I add it again
And that's what happen:
There are no click/pops in the audio, it's just visual. I tried to put breakpoints and all kind of checks in both processBlock and renderNextBlock but the currentSample is always 0 until I play a note, so I don't understand why that happen. I check every pointer I use (!= nullptr) and tried to reduce all the unecessary things.
It doesn't happen if I load and re-load the plugin WITHOUT playing any note the first time. Alsodoesn't seem to happen if I load it in mono, but sometimes the burst happens on both channels in stereo.
I spent all day trying to track this thing down. Hopefully someone can help.