Basic dummy AudioProcessorPlayer and Graph


#1

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));

connectAudioNodes();

player.setProcessor(&mainProcessor);    
audioDeviceManager.addAudioCallback(&player);

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?


#2

Try adding these:

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

after you add each type of node.


#3

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