Noise Gate - AUv3 Validation Error

I’m trying to build the NoiseGate example plugin that you have for AUv3.
The plugin builds but crashes when validating with auval.

The error that shows is:
In the format test : ERROR: Initialised Unit incorrectly set to InputChans:3 OutputChans:1

Any help on how to solve this?

Hi,
Did anyone of the JUCE team looked at this at some point?

It seems that symmetrical I/O greater than stereo fails with JUCE built and AUv3.

I was able to reproduce the above issue with latest develop and AudioPluginDemo by commenting out the following:

        // only allow stereo and mono
        if (mainOutput.size() > 2)
            return false;

This results:

Reported Channel Capabilities (explicit):
      [-1, -1]  

Input/Output Channel Handling:
1-1   1-2   1-4   1-5   1-6   1-7   1-8   2-2   2-4   2-5   2-6   2-7   2-8   4-4   4-5   5-5   6-6   7-7   8-8
X                                         X                                   X           X     X     X     X     
ERROR: Initialised Unit incorrectly set to InputChans:3 OutputChans:1

WARNING: Source AU supports multi-channel output but does not provide a channel layout

* * FAIL
--------------------------------------------------
AU VALIDATION FAILED: CORRECT THE ERRORS ABOVE.
--------------------------------------------------

(I was able to reproduce this with several projects, even if I explicitly set number of channels so it don’t spit the warning just the error).

In general, it feels AUv3 has many issues within the JUCE wrapper.
(I’ll try to look deeper but this I think there are many issues within the JUCE wrapper itself and multi-channel / layouts).

It seems the problem with AUv3 is in
bool shouldChangeToFormat (AVAudioFormat* format, AUAudioUnitBus* auBus)

It correctly checks and change the bus layout. (eg we’re allowed to have 3 inputs).
But it invalidates the entire layout (where now, the condition of equality between Inputs and Outputs is broken).

So ideally, you’d like to check for the entire target layout within the call.

Eg (demo code);

                auto currentBusLayout = processor.getBusesLayout();
                auto& curBus = currentBusLayout.getBuses(isInput).getReference(busIdx);
                curBus = newLayout;
                if (!processor.checkBusesLayoutSupported (currentBusLayout))
                    return false;
1 Like

Thanks for your patience. I think this issue must have got lost around all of the JUCE 8 work.

I think that the ERROR and WARNING lines in the auval output refer to two separate issues.

The ERROR seems to be triggered when the plugin accepts a new bus layout while the audio unit is in an initialised state. I’ve pushed a change here that fixes the error:

The WARNING is a bit trickier. It sounds like the plugin needs to advertise its channel layouts somewhere, but I’m not entirely sure where this needs to happen. If I update the AUAudioUnitBuses to provide the list of supported channel layout tags, then this causes new errors elsewhere during the validation. At the moment I haven’t made much progress here.