diff --git a/src/dsp/mimo.cpp b/src/dsp/mimo.cpp index 88d74d2..4807225 100644 --- a/src/dsp/mimo.cpp +++ b/src/dsp/mimo.cpp @@ -126,8 +126,9 @@ void MIMOWorker::update() { count++; } float power = 0.0; - for (int i = 0; i < N_SAMPLES; i++) { - power += powf(out[i], 2); + for (int i = 1; i < N_SAMPLES-1 ; i++){ + float MA = out[i] * 0.5f - 0.25f*(out[i +1] + out[i -1]); + power += powf(MA, 2); } power /= static_cast(N_SAMPLES * count); @@ -140,4 +141,4 @@ void MIMOWorker::update() { powerdB[m] = power; } -} \ No newline at end of file +}