FFT algorithm, translated from "Numerical Recipes in C++"
Implements the Fast Fourier Transform, which performs a discrete Fourier transform
in O(nlogn).
Perform a filter by the following algorithm:
sample -> window -> FFT -> buffer
buffer * frequency response
buffer -> IFFT -> window -> sample
Window used is square root of Hamming window, because
the sum at half-window overlap is a constant, which
avoids amplitude distortion from noise.