AUv3 latency changes not working

We are running into an issue with our new iOS AUv3 apps. In particular, latency is failing to update after construction (if changed at the start of the audio buffer).

While troubleshooting in AUM, I received this example code from a Kymatica plugin:

- (NSTimeInterval)latency {
    NSTimeInterval l = _param_lookahead.value / 1000.0;
    if(_limiterEnabled)
        l += _limiterDuration * 2.0;
    return l;
}

- (void)setLimiterDuration:(float)limiterDuration {
    [self willChangeValueForKey:@"latency"];
    _limiterDuration = limiterDuration;
    [self didChangeValueForKey:@"latency"];
}

Here is the relevant code in JUCE’s AUv3 wrapper:

In general, the AUv3 latency method is overridden on line 841, but no notification is sent to the host as far as I can tell.

Just edited my post to clarify the bug. I want to bump this to see if anyone else is having this trouble.

Thanks for reporting, I’ve got a fix for this on the way.

1 Like

Thank you for the fix! I can confirm that this now works on my end.

For the record, the relevant change:

1 Like