hi, I’d like to understand ho to make AudioProcessorGraph to work… Actually I can’t hear any sound…
this is my constructor:
AudioProcessorGraph::Node::Ptr inputNodePtr = graph.addNode(std::move(input));
AudioProcessorGraph::Node::Ptr processor1Ptr = graph.addNode(std::move(processor1));
AudioProcessorGraph::Node::Ptr outputNodePtr = graph.addNode(std::move(output));
graph.addConnection({ { inputNodePtr->nodeID, 0 }, { processor1Ptr->nodeID, 0 } });
graph.addConnection({ { inputNodePtr->nodeID, 1 }, { processor1Ptr->nodeID, 1 } });
graph.addConnection({ { processor1Ptr->nodeID, 0 }, { outputNodePtr->nodeID, 0 } });
graph.addConnection({ { processor1Ptr->nodeID, 1 }, { outputNodePtr->nodeID, 1 } });
this is my prepareToPlay
graph.setPlayConfigDetails(getMainBusNumInputChannels(), getMainBusNumOutputChannels(), sampleRate, samplesPerBlock);
graph.setProcessingPrecision(getProcessingPrecision());
graph.prepareToPlay(sampleRate, samplesPerBlock);
and this my processBlock
juce::ScopedNoDenormals noDenormals;
auto totalNumInputChannels = getTotalNumInputChannels();
auto totalNumOutputChannels = getTotalNumOutputChannels();
for (auto i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
buffer.clear (i, 0, buffer.getNumSamples());
graph.processBlock(buffer, midiMessages);
I read about the AudioProcessorPlayer, but I’m in a plugin… Is that needed Anyway??
