Migrate from processBlock to getNextAudioBlock

Hi, I want to use the code from this repo to my project:

However, the repo use processBlock() while I’m using getNextAudioBlock() and get audio block dynamic base on audio speed. As I understand, processBlock() process the whole audio, while getNextAudioBlock() process audio by chunks.

So my question is how to integrate processBlock() to getNextAudioBlock() scheme. Thanks for any help

You can easily create a proxy buffer that contains only the active region of your AudioSourceChannelInfo

void getNextAudioBlock(const juce::AudioSourceChannelInfo& info)
{
    juce::AudioBuffer<float> buffer (
        info.buffer->getArrayOfWritePointers(),
        info.buffer->getNumChannels(),
        info.startSample,
        info.numSamples());

    juce::MidiBuffer midiDummy;

    processor->processBlock (buffer, midiDummy);
}