I’ve been trying to get started with writing a plugin using an AudioProcessorGraph connecting a number of my own AudioProcessor. But without success…
It all started from the Introjucer (4.1) to create a plugin, I replaced the default plugin AudioProcessor (in PluginProcessor.cpp/h) by an AudioProcessorGraph. I removed the original override of processBlock. And I added the graph constructions commands into the prepareToPlay function to simply connect the inputs to the outputs:
class MyAudioProcessorGraph: public AudioProcessorGraph
void MyAudioProcessorGraph::prepareToPlay (double sampleRate, int samplesPerBlock)
inProc = new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioInputNode);
inNode = addNode(inProc);
outProc = new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode);
outNode = addNode(outProc);
addConnection(inNode->nodeId, 0, outNode->nodeId, 0);
I don’t have any compilation error (debug mode), but when the plugin gets instantiated by the JUCE audio plugin host, it stops at this jassert. Which I don’t understand why.
// the processor may not support this arrangement at all jassert (newNumIns == getTotalNumInputChannels() && newNumOuts == getTotalNumOutputChannels());
I must be doing something silly, any ideas?
value for newNumIns is 0 and getTotalNumInputChannels() returns 1