connornishijima / SensoryBridge

OSHW Advanced LED Audio Visualizer based around a hacky Discrete Fourier Transform
GNU General Public License v3.0
79 stars 10 forks source link

interpolate_multiplier() Index out of bounds #9

Closed Matlock42 closed 1 year ago

Matlock42 commented 2 years ago

Bug was introduced on commit e940db4b73b383bcd132bb3d987e4ff92f432051 when multipliers_smoothed went from size of 6 => 4.

The for loop in fft.h, line 235 did not get changed to only iterate 4 times.

  for (uint8_t i = 0; i < 6; i++) {
    if (multipliers_smoothed[i] < mult_min) {
      mult_min = multipliers_smoothed[i];
    }
  }
connornishijima commented 1 year ago

Thank you for the catch! Your PR is now merged. :)