In the tutorial the audio is processed like so…
void getNextAudioBlock (const juce::AudioSourceChannelInfo& bufferToFill) override
{
if (readerSource.get() == nullptr)
{
bufferToFill.clearActiveBufferRegion();
return;
}
transportSource.getNextAudioBlock (bufferToFill);
}
You can do the exact same thing in a plug-in, the only difference being that you’ll need to create the AudioSourceChannelInfo
object yourself, which you can do very simply like so:
void processBlock (AudioBuffer<float>& buffer, MidiBuffer &midiMessages)
{
juce::AudioSourceChannelInfo channelInfo (buffer);
}