I have a plugin synth which had been released a few years ago.
I have released several updates and the last one was released on May 2021.
Now I’ve finished coding my latest version and I’m building the release binaries.
Win/VST works well, mac Standalone works well, but mac AU glitches.
The glitching AU plugin loads without any error on Logic Pro X, but once the audio processing starts it makes extreme noise.
The noise is rather tonal than random, I kind of remember hearing this kind of noise when I had set an extreme value into the rendering buffer.
I don’t think my code is essentially wrong because the Win-VST version and Mac Standalone version work, and what’s more, I have reverted my code to the previous release(the May '21 one) and it makes the same glitch(!).
What I have done besides the code since my last release are:
Updated JUCE (5.4.5 → 6.1.5)
Updated Xcode (12.x(forgot the exact version) → 13.2.1)
Tried to build with JUCE 5.4.5 but didn’t success for Rez error. It looks similar to this but changing #include <AudioUnit/AudioUnit.r> to #include <AudioUnit.r> didn’t work.
Pretty strange.
My rendering block of SynthesizerVoice starts like this, which does nothing when no note is played.
But the plugin starts making noise immediately after launched, even no key is pressed.
void BaseVoice::renderNextBlock (AudioSampleBuffer& outputBuffer, int startSample, int numSamples)
{
if (getCurrentlyPlayingNote() == -1) { //A
return;
}
//B
I set the breakpoint at //B to make sure the condition //A works. As result, the condition works, breakpoint is never hit, and the noise starts immediately.