This project on CodeProject might be of use to you as it's in C# and deals with audio processing via the Cooley-Turkey FFT algorithm.
If you don't want to sift through it here is the byte to complex number bit:
byte[] data = yourByteArray;
double[] x = new double[data.Length];
for (int i = 0; i < x.Length; i++)
{
x[i] = data[i] / 32768.0;
}
ComplexNumber[] data = new ComplexNumber[length];
for (int i = 0; i < x.Length; i++)
{
data[j] = new ComplexNumber(x[i]);
}
I don't know much about sound processing so don't know whether the dividing by 32768 is unique to this solution or true in general.
Also, although this will be 100% accurate, I don't know how well it performs. If that becomes an issue you might need to refactor.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…