ERROR: -1 IN CALL AudioUnitRender


#1

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?


#2

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.


#3

Sounds like the PList change due to some Apple AU changes. Have a look here.

Chris


#4

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.