nausea

curses audio visualizer
git clone git://git.2f30.org/nausea.git
Log | Files | Refs | README | LICENSE

commit 259d7a040589b7bed74c54b05a4282ce2b6d2c0a
parent 0ee432c19f9f67d3d8eb5b0d0352168cfb957b9c
Author: sin <sin@2f30.org>
Date:   Wed Nov 20 11:03:31 +0000

Normalize by the actual number of samples

Diffstat:
spectrum.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/spectrum.c b/spectrum.c @@ -170,7 +170,7 @@ draw(struct frame *fr) fr->res[i] = sqrt(fr->out[i][0] * fr->out[i][0] + fr->out[i][1] * fr->out[i][1]); /* normalize it */ - fr->res[i] /= nsamples; + fr->res[i] /= (nsamples / 2); /* scale it */ fr->res[i] *= fr->height * BARSCALE; }