From 984133973128607a4d1af647692d1c3b8c3f5933 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Tue, 26 Mar 2013 21:30:27 +0000 Subject: include frequency boundaries --- spectrogram.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/spectrogram.c b/spectrogram.c index 70a2bfd..3be2cae 100644 --- a/spectrogram.c +++ b/spectrogram.c @@ -166,11 +166,11 @@ draw(double *left, double *right, int p, int step) if (discolight) { av = pow(left[x] + right[x], 2.0); - if (x > 100 / step && x < 800 / step) + if (x >= 100 / step && x <= 800 / step) lo += av; - if (x > 500 / step && x < 2000 / step) + if (x >= 500 / step && x <= 2000 / step) mi += av; - if (x > 1500 / step && x < 5000 / step) + if (x >= 1500 / step && x <= 5000 / step) hi += av; } -- cgit v1.2.3