- save 1K of RAM by optimizing out fftBin[]. - moved several copies of the peak reset code into a single function - moved peak detection out of getSample(). - call peak detection function as last step of FFTcode. More optimal, and we can be sure that fresh FFT result are available. Peak detection/reset are now called from both tasks, so I had to move some peak-related vars out of AudioReactive class and make them global (static).
75 KiB
75 KiB