AudioProcessorPlayer with VST effect plugin ioCallback


#1

Hi,
I’ve been fooling around with the AudioProcessor classes and i have the following question.
I have an AudioProcessorPlayer with it’s processor set to a AudioPluginInstance (wich is a VST effect plugin).
I thought i could do use the code below to apply this VST effect to audio sources i have playing. But it seems that the AudioProcessorPlayer zero’s the data before calling the plugin. What should i be doing to get the audio to be processed by the plugin?
Or am i using the wrong approach (as usual :wink: ).

void MainComponent::audioDeviceIOCallback (const float** inputChannelData,
										   int totalNumInputChannels,
										   float** outputChannelData,
										   int totalNumOutputChannels,
										   int numSamples)
{

    audioSourcePlayer.audioDeviceIOCallback (inputChannelData, totalNumInputChannels, outputChannelData, totalNumOutputChannels, numSamples);
	audioProcessorPlayer.audioDeviceIOCallback (inputChannelData, totalNumInputChannels, outputChannelData, totalNumOutputChannels, numSamples);    
}

#2

Yes… that’s a strange approach. The idea with AudioProcessors is that you’d use an AudioProcessorGraph to connect more than one of them together, and then you can route the audio however you like without worrying about stuff like this.


#3

Hi,

Well, that’s what i thought you would say :wink:
Anyway, i finally ended up creating my own version of an MixerAudioSource to wich you can add inputs as well as audioPlugins (AudioPluginInstance’s).
I just call processblock on each AudioPluginInstance in the getNextAudioBlock callback after having combined the all inputs.