commit b276217359c244a3c3d36fa81b014eddec1d0318
parent a05e0aeeb6fedda57e74080100b7dea2a1645f65
Author: lostd <lostd@2f30.org>
Date: Sun, 10 May 2015 01:58:11 +0300
Divide at the end to make it more responsive
Diffstat:
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/nausea.c b/nausea.c
@@ -478,9 +478,8 @@ draw_boom(struct frame *fr)
avg += abs(fr->in[i]);
avg /= fr->gotsamples;
/* scale it to our box */
- r = (avg / INT16_MAX) * dim;
#define RADSCALE 2
- r *= RADSCALE;
+ r = (avg * dim * RADSCALE / INT16_MAX);
#undef RADSCALE
/* center */