Firstly, I copied the four channels of the buffer in the processblock
void QUAD_CorrAudioProcessor::processBlock (juce::AudioBuffer<float>& buffer, juce::MidiBuffer& midiMessages)
{
juce::dsp::AudioBlock<float> block(buffer);
auto c1 = block.getSingleChannelBlock(0);
auto c2 = block.getSingleChannelBlock(1);
auto c3 = block.getSingleChannelBlock(2);
auto c4 = block.getSingleChannelBlock(3);
yuanThread.clonebuffer(c1,c2,c3,c4);
Then I use the clonebuffer function in the thread to retrieve the copied blocks from the processblock and obtain pointers for each of the four channels
void IamgeProcessingThread::clonebuffer(const juce::dsp::AudioBlock<float>& other1, const juce::dsp::AudioBlock<float>& other2, const juce::dsp::AudioBlock<float>& other3, const juce::dsp::AudioBlock<float>& other4)
{
buffer1.clear();
buffer2.clear();
buffer3.clear();
buffer4.clear();
juce::dsp::AudioBlock<float> block1(buffer1);
juce::dsp::AudioBlock<float> block2(buffer2);
juce::dsp::AudioBlock<float> block3(buffer3);
juce::dsp::AudioBlock<float> block4(buffer4);
DBG("copy");
block1.copyFrom(other1);
block2.copyFrom(other2);
block3.copyFrom(other3);
block4.copyFrom(other4);
}
Unfortunately, it keeps reporting errors
