AU, OS 10.7. Plugin validates and loads fine in AULab. But fails validation in Logic with this error:
ERROR: -1 IN CALL AudioUnitRender
Anyone else ever get that? Any ideas on what it means?
AU, OS 10.7. Plugin validates and loads fine in AULab. But fails validation in Logic with this error:
ERROR: -1 IN CALL AudioUnitRender
Anyone else ever get that? Any ideas on what it means?
No idea! The code for the juce render call will never return -1, so that must be some kind of internal Logic error code, but it's anyone's guess about what it might mean.
It turns out this piece of code in the processBlock() method was causing the issue:
if ((long) (bpm * 10000) != (long) (posInfo.bpm * 10000)) { bpm = posInfo.bpm; setParameter(DELAYTIMER, delayPPQ); setParameter(LFORATER, lfoRatePPQ); }
This is checking to see if the host's bpm has changed, and if so, updates the synced lfo and delay rates. Out of curiosity, is this bad practice? Or was Logic just being a dick? Either way I fixed it with this:
if ((long) (bpm * 10000) != (long) (posInfo.bpm * 10000) && (int) posInfo.bpm != 0) { bpm = posInfo.bpm; setParameter(DELAYTIMER, delayPPQ); setParameter(LFORATER, lfoRatePPQ); }
If the host's bpm is 0 then I know it isn't actually loaded yet and ignore the setParameter calls.