VST3 with 0 inputs


Hey Jules -


I've been rebuilding all my plugs as VST3 today.

Seems the synth has some issues because of the 0 inputs:

Basically, in the function below ( VST3_wrapper ), the plugin is initialized, but doesn't add anything to the
audioInputs array (because there are no inputs).


At the end of this function it calls preparePlugin (processSetup.sampleRate, (int) processSetup.maxSamplesPerBlock) ...

... which throws an exception at 1362 ... where it tries to get an input .... audioInputs.first()->getInfo (inputBusInfo);



    tresult PLUGIN_API initialize (FUnknown* hostContext) override


        if (host != hostContext)

            host.loadFrom (hostContext);

       #if JucePlugin_MaxNumInputChannels > 0

        addAudioBusTo (audioInputs, TRANS("Audio Input"),

                       getArrangementForNumChannels (JucePlugin_MaxNumInputChannels));


       #if JucePlugin_MaxNumOutputChannels > 0

        addAudioBusTo (audioOutputs, TRANS("Audio Output"),

                       getArrangementForNumChannels (JucePlugin_MaxNumOutputChannels));


       #if JucePlugin_WantsMidiInput

        addEventBusTo (eventInputs, TRANS("MIDI Input"));


       #if JucePlugin_ProducesMidiOutput

        addEventBusTo (eventOutputs, TRANS("MIDI Output"));


        processContext.sampleRate = processSetup.sampleRate;

        preparePlugin (processSetup.sampleRate, (int) processSetup.maxSamplesPerBlock);

        return kResultTrue;



Am I doing something wrong?

Sounds like nobody ever tried it with 0 inputs before! That bit of code should have been checking the pointer before using it though - I've updated that now, so let me know if anything else causes a problem!