Hello guys,
I wonder if the bypass parameter in juce_AAX_Wrapper.cpp is added correctly.
In my plugin code I did the following:
- Added a master bypass parameter to the PluginProcessor.
- Implemented AudioProcessor’s
getBypassParameter()
method which returns this parameter (e. g. to the wrapper).
When debugging the juce_AAX_Wrapper I realize the following things:
In the wrapper’s method addAudioProcessorParameters()
there is a call to the method isBypassPartOfRegularParemeters()
which returns true
if the array juceParameters
(of type LegacyAudioParametersWrapper
) contains the bypass parameter:
auto bypassPartOfRegularParams = isBypassPartOfRegularParemeters();
But this will never be the case respectively bypassPartOfRegularParams
is always false
because at this point in addAudioProcessorParameters()
the array juceParameters
doesn’t contain any parameters yet. The parameters are added via the next line:
juceParameters.update (audioProcessor, forceLegacyParamIDs);
(Now the result of isBypassPartOfRegularParemeters()
would be true
.)
Because of bypassPartOfRegularParams == false
some lines below the bypass parameter is added (again) via
juceParameters.params.add (bypassParameter);
to the LegacyAudioParametersWrapper
. Now juceParameters
contains the bypass param twice.
In the following code juceParameters
is used to create and add the AAX_CParameters
. The AAX code and / or the host seem to check if a parameter has already been added and prevents worse.
I guess isBypassPartOfRegularParemeters()
should be called after juceParameters.update()
.
By the way: Is there a typo in “isBypassPartOfRegularParemeters”? Also in juce_VST3_Wrapper.cpp.