Basic dummy AudioProcessorPlayer and Graph

I am new to Juce, and trying to use an AudioProcessorPlayer with an AudioProcessorGraph to simply copy 2 audio input channels to 2 output channels and render.

I have the following setup:

audioInputNode = mainProcessor.addNode(&audioProcessor);
audioOutputNode = mainProcessor.addNode (new AudioProcessorGraph::AudioGraphIOProcessor (AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode));



and the following connection code:

void MainComponent::connectAudioNodes()
    for (int channel = 0; channel < 2; ++channel)
        mainProcessor.addConnection ({ { audioInputNode->nodeID,  channel },
                                    { audioOutputNode->nodeID, channel } });

The processBlock of the custom audioProcessor I have created (which does nothing) is executed, but I hear no audio output. What am I doing wrong/missing?

Try adding these:

audioInputNode ->getProcessor()->enableAllBuses();

after you add each type of node.

Yes! Figured out my problem, and that was a part of it, thank you.