Connecting an AudioSourcePlayer to an AudioProcessorGraph


#1

Hi All,
I am working on a simple VST host that allows the user to load a wav or aif file and then play the audio through one or more VST plugins. I have been able to accomplish this by creating individual instances of AudioPluginInstance and then manually hooking them up to the audio stream in my audioDeviceIOCallback method:

void SimpleHostController::audioDeviceIOCallback (const float** inputChannelData, int totalNumInputChannels,  float** outputChannelData,  int totalNumOutputChannels,  int numSamples)
{
   // pass the audio callback on to our player source
   audioSourcePlayer.audioDeviceIOCallback (inputChannelData, totalNumInputChannels, outputChannelData, totalNumOutputChannels, numSamples);
   
   // pluginInputBuffer is a class member of AudioSampleBuffer type
   pluginInputBuffer.setDataToReferTo (outputChannelData, 2, numSamples);

   // pass the audio data through the 1st plugin
   clientPlugin0->processBlock (pluginInputBuffer, pluginMIDIBuffer);

   // and now through the 2nd one
   clientPlugin1->processBlock (pluginInputBuffer, pluginMIDIBuffer);
}

I would like to use an AudioProcessorGraph, but so far have not been able to get it to work in conjunction with the AudioSourcePlayer. I’m looking for hints about how to accomplish this.

Specifically,

  1. Do I need to use an AudioProcessorPlayer? And if so, how do I go about connecting it to the AudioSourcePlayer?

  2. Do I need to use AudioProcessorGraph::AudioGraphIOProcessors in the graph, or are these only required if one wants to connect to input and output devices?


#2

Has anyone found an answer for this one? Would appreciate any help on this, thanks.