[SOLVED] Process block unchanged only on VST

Hi guys,

I have developed some plugin freebies and right now I’m developing my first commercial plugin. I’m doing all the development on Mac and, when everything’s ready, I switch to Windows just to compile. Usually I have to change stuff like fonts, positions, colours and that kind of stuff, but overall the process is straightforward. Just create a Visual Studio exporter, make little changes, compile and it’s ready to upload.
But today something happened that I didn’t think it was even possible: my plugin is passing audio untouched only on Windows. How’s that possible? Has this ever happened to you? Any advice?
Making any changes to the code like adding an extra for loop as a last step for muting the audio causes a crash, the plugin doesn’t even load. But I tested this exact same thing on Mac and again, there wasn’t any problems and the audio was muted.

float** data = buffer.getArrayOfWritePointers();
for (int i = 0; i < buffer.getNumSamples(); i++)
{
    data[0][i] = 0.f;
    data[1][i] = 0.f;
}

I’m terribly lost.
I use Reaper on both platforms to make the plugin tests.
I’m sorry if this ends up being something silly, my only guess right is that I’m missing something reaaaally obvious here.

Maybe one (or both?) data pointers are nullptr? How about you put some assertion in there and run it in debug mode, just to be sure?

Have a look for the number of input channels available in the beginning of the process block, and be sure you have the last version of the JUCE code :wink:

If both pointers are nullptr shouldn’t be the issue the same on Mac?

Also check for uninitialised variables.

Not necessarily. Depends on the host and audio-interface. Maybe your channel configuration is simply not available. Impossible for us to know without more information.

I realised that it was the VST versions the ones broken, both on Mac and Windows. Running the plugin in debug mode showed that the buffer received in the process block was empty (or there was no buffer received).
Solution: I downloaded JUCE from the develop tree, created a new project and pasted the code needed from the original project. Working now an Mac, Windows, AU, VST and AAX.
Thank you all, specially you @IvanC!

1 Like