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);
}