make integral coefficient denpendent on height

higher terminals should have slightly higher integral value for
visualisation to appear smoother.
master
karlstav 6 years ago
parent 88de9b6027
commit a5cab50a20
  1. 5
      cava.c

@ -605,6 +605,9 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co
// process [smoothing]: calculate gravity
g = p.gravity * ((float)height / 2160) * pow((60 / (float)p.framerate), 2.5);
// calculate integral value
double integral = p.integral * sqrt(log10(h / 3 + 1));
// checks if there is stil extra room, will use this to center
rest = (w - bars * p.bw - bars * p.bs + p.bs) / 2;
if (rest < 0)
@ -916,7 +919,7 @@ as of 0.4.0 all options are specified in config file, see in '/home/username/.co
// process [smoothing]: integral
if (p.integral > 0) {
f[o] = fmem[o] * p.integral + f[o];
f[o] = fmem[o] * integral + f[o];
fmem[o] = f[o];
int diff = (height + 1) - f[o];

Loading…
Cancel
Save