I’m sure someone can help me here, this must be REALLY simple, but I just don’t have the logic to do it…
Every time px is greater than 1, I want to store this value, and sum with all the others that are also greater than 1.
In this case, if px is always 2, after the 800 instances of i, PeakBufferLeft1 is going to be 1600, but it is never 1600, cause there some math code missing that I don’t know…
for (int i = 0; i < bufferSize; i++) //bufferSize is 800
if (px[i] > 1) {
PeakBufferLeft1 = px[i];
}
What am I missing?