How to set sample rate in a VST3 plugin

I try to create a vst3 plugin that can resample audio data to a given sample rate. Just like the “Resampling Plugin” of Wavelab.

How can a vst3 plugin change the output sample rate?

A further problem is that I have only one sample count: “data.numSamples”. For the sample rate conversion the input and output sample count differs.

Is it even possible that vst3 plugins have different sample counts for input and output?

I wonder how the Wavelab Resampling Plugin manages this.

I tried to change the output sampling rate in the “setupProcessing” method, but this doesn’t have any effect:

tresult PLUGIN_API MyPlugin::setupProcessing(ProcessSetup& newSetup)
{   
    // Set the output sample rate to 48000 Hz
    newSetup.sampleRate = 48000.0;  

    // Save the updated process setup for later use
    processSetup = newSetup;

    // Call the base class setupProcessing method
    return AudioEffect::setupProcessing(newSetup);
}

VST3 only supports the same sample rate for input and output. It’s not possible to set the sample rate from the plug-in side.

ok, so how does the Resampling plugin of Wavelab manages to change the sample rate? Is it some special kind of build-in plugin?
Can the output sample count differ from the input sample count?

The Resampling plug-in is build directly into WaveLab and you cannot build a similar plug-in with the VST SDK.
The number of samples per block is defined by the host, a plug-in cannot change it.