Skip to content

Commit c3fef62

Browse files
committed
increased responsivnes
1 parent 85add3e commit c3fef62

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

cava.c

+5-5
Original file line numberDiff line numberDiff line change
@@ -544,7 +544,7 @@ Options:\n\
544544

545545
// process: weigh signal to frequencies
546546
for (n = 0; n < bands;
547-
n++)k[n] = pow(fc[n],0.62) * ((float)height/(M*2000)) * 8;
547+
n++)k[n] = pow(fc[n],0.62) * ((float)height/(M*3000)) * 8;
548548

549549

550550

@@ -637,8 +637,9 @@ Options:\n\
637637
// process [smoothing]
638638
if (!scientificMode)
639639
{
640-
for (o = 0; o < bands; o++) {
641640

641+
// process [smoothing]: falloff
642+
for (o = 0; o < bands; o++) {
642643
temp = f[o];
643644

644645
if (temp < flast[o]) {
@@ -667,10 +668,9 @@ Options:\n\
667668
}
668669
}
669670

671+
// process [smoothing]: integral
670672
for (o = 0; o < bands; o++) {
671-
672-
fmem[o] += f[o];
673-
fmem[o] = fmem[o] * 0.55;
673+
fmem[o] = fmem[o] * 0.55 + f[o];
674674
f[o] = fmem[o];
675675

676676
if (f[o] < 1)f[o] = 1;

0 commit comments

Comments
 (0)