Hey everyone!
I am creating a VST3 plugin and need to run an FFT on the incoming audio. This is the code for the processBlock:
//===========================================================
void MyMidireaderAudioProcessor::processBlock (AudioBuffer& buffer, MidiBuffer& midiMessages)
{
ScopedNoDenormals noDenormals;
auto totalNumInputChannels = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear (i, 0, buffer.getNumSamples());
for (int channel = 0; channel < totalNumInputChannels; ++channel)
{
auto* channelData = buffer.getWritePointer (channel);
window.multiplyWithWindowingTable (channelData, buffer.getNumSamples());
forwardFFT.performFrequencyOnlyForwardTransform (channelData);
}
}
//===========================================================
It compiles just fine but when I try to run it in the JUCE AudioPluginHost App it crashes the moment I add the VST3 into the plugin host. I am using Visual Studio 2017 and the process memory graph is extremely high. I;m running out of memory. COuld I have suggestions on what I am doing wrong?
