BR: If juce::VST3ClientExtensions::getCompatibleClasses is implemented, plugin will fail to load VST2 state

If juce::VST3ClientExtensions::getCompatibleClasses is implemented, plugin will fail to load VST2 state. loadVST2CompatibleState is wrapped in an JUCE_VST3_CAN_REPLACE_VST2 ifdef, but it also needs to be used if getCompatibleClasses returns anything but an empty list.

    void loadStateData (const void* data, int size)
    {
       #if JUCE_VST3_CAN_REPLACE_VST2
        if (loadVST2CompatibleState ((const char*) data, size))
            return;
       #endif
        setStateInformation (data, size);
    }

Took a stab at implementing here: reFX: Support loading VST2 state in VST3 plugins · reFX/JUCE@07b8cca · GitHub

1 Like