AUv3 function using wrong interface

static auto createParameter (const AudioProcessorParameter& parameter)
{
    ...
        auto getParameterIdentifier = [&parameter]
        {
            if (const auto* paramWithID = dynamic_cast<const AudioProcessorParameterWithID*> (&parameter))
                return paramWithID->paramID;

            // This could clash if any groups have been given integer IDs!
            return String (parameter.getParameterIndex());
        };
    ...
}

The dynamic cast should be to the base class that provides the accessor to the thing wanted, here is what I would have expected:

        auto getParameterIdentifier = [&parameter]
        {
            if (const auto* paramWithID = dynamic_cast<const HostedAudioProcessorParameter*> (&parameter))
                return paramWithID->getParameterID();

            // This could clash if any groups have been given integer IDs!
            return String (parameter.getParameterIndex());
        };

Likewise I would expect that LegacyAudioParameter, if it is indeed overloading a function called getParameterID that is should derive from HostedAudioProcessorParameter:

class LegacyAudioParameter :   public AudioProcessorParameter
{
    ...
    String getParamID() const { return processor->getParameterID (parameterIndex); }
    ...
}

I would have expected:

class LegacyAudioParameter :   public HostedAudioProcessorParameter
{
    ...
    virtual String getParameterID() const override { return processor->getParameterID (parameterIndex); }
    ...
}

Thanks for reporting, we’ve updated everything to use the Hosted parameter where appropriate: