Compare commits

..

No commits in common. "fa4443a3cee593611b1720282927e12e4c8c691f" and "66bc3f1c2ccb1407ec09d6339c41577fcea0ce67" have entirely different histories.

View File

@ -589,7 +589,7 @@ struct spectrum
size_t buffer_len; ///< Input buffer fill level
size_t buffer_size; ///< Input buffer size
/// Decode the respective part of the buffer into the second half of data
/// Decode the respective part of the buffer into the last 1/3 of data
void (*decode) (struct spectrum *, int sample);
float *data; ///< Normalized audio data
@ -781,7 +781,6 @@ spectrum_init (struct spectrum *s, char *format, int bars, struct error **e)
// having the amount of bins be strictly a factor of Nyquist / 20 (stemming
// from the equation 20 = Nyquist / bins). Since log2(44100 / 2 / 20) > 10,
// it would be fairly expensive, and somewhat slowly updating. Always.
// (Note that you can increase window overlap to get smoother framerates.)
double audible_ratio = s->sampling_rate / 2. / 20000;
s->bins = ceil (necessary_bins * MAX (audible_ratio, 1));
s->useful_bins = s->bins / 2;