#1 most common programming mistake that we see on the forum

That would be a pretty bad way of doing it. If the plugin ever needed to support more channels, more if statements would need to be added and the chance of mistakes in variable names would increase.

Something like this would be better :

 for (int channel = 0; channel < buffer.getNumChannels(); ++channel)
 {
    float* data = buffer.getWritePointer(channel);
    for (int sample = 0; sample < buffer.getNumSamples(); ++sample)
    {
        data[sample] = doSomeProcessing (lastSamples[channel]);
        lastSamples[channel] = data[sample]; //current sample becomes last sample
	}
 }
2 Likes