aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2013-03-26 21:30:27 +0000
committerDimitri Sokolyuk <demon@dim13.org>2013-03-26 21:30:27 +0000
commit984133973128607a4d1af647692d1c3b8c3f5933 (patch)
treefbb4ed5961f732f1e19c5e0edbdbc64bd021f68e
parent0a985ab2418709f8da16fa536058354bc1f3ec0e (diff)
include frequency boundaries
-rw-r--r--spectrogram.c6
1 files 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;
}