Hi All,
Im trying to play an audio file through an AudioProcessorGraph. The input to the graph is a processor that plays and grabs next block of audio from a file - and this works fine if I play this processor directly through AudioProcessorPlayer passed to the IOcallback.
However when I join the player through a graph I get no audio (or noisy audio depending which node I add the player).
This works fine (i.e. without going through the graph):
pluginInstance = createPluginFilter();
graphPlayer.setProcessor(pluginInstance);
deviceManager.addAudioCallback (&graphPlayer);
deviceManager.initialise (0, 2, nullptr, true);
readerSource = new AudioFormatReaderSource(formatManager.createReaderFor (file), true);
pluginInstance->setFileReader(readerSource);
However this either does not play audio or plays high pitch looping noise depending on where I insert pluginInstance node into the graph.
pluginInstance = createPluginFilter();
deviceManager.addAudioCallback (&graphPlayer);
deviceManager.initialise (0, 2, nullptr, true); //inits num chans
readerSource = new AudioFormatReaderSource(formatManager.createReaderFor (file), true);
pluginInstance->setFileReader(readerSource);
nodeI = graph.addNode(pluginInstance);
fInputNode = nodeI->nodeId;
outp = new AudioProcessorGraph::AudioGraphIOProcessor(AudioProcessorGraph::AudioGraphIOProcessor::audioOutputNode);
nodeO = graph.addNode(outp);
fOutputNode = nodeO->nodeId;
Connect(fInputNode, fOutputNode);
graphPlayer.setProcessor(&graph);
What am I doing dodgy here?
Ive had a good browse on the forum but have not been able to get a handel on what I may be doing wrong here.
Any Comments appreciated.