Spetrum analyser: expand my favourite comment
This commit is contained in:
parent
2d641d087f
commit
353174ee3c
3
nncmpp.c
3
nncmpp.c
|
@ -793,7 +793,8 @@ 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.)
|
||||
// (Note that you can increase window overlap to get smoother framerates,
|
||||
// but it would remain laggy.)
|
||||
double audible_ratio = s->sampling_rate / 2. / 20000;
|
||||
s->bins = ceil (necessary_bins * MAX (audible_ratio, 1));
|
||||
s->useful_bins = s->bins / 2;
|
||||
|
|
Loading…
Reference in New Issue