I know I'm definitely not the first to ask about using FFT to find frequencies with Android's AudioRecord, but after reading tons of forums, I'm still not understanding it too well.
I ended up using the class ComplexDoubleFFT, part of the Herschel Common Science System and code similar to here.
AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, rate, channelConfig, audioFormat, bufferSize);
...
double[] micBufferData = new double[audioData.length];
int x=0;
for(short data : audioData)
{
micBufferData[x] = data;
x++;
}
FFT newFFT = new FFT(bufferSize/2);
newFFT.ft(micBufferData);
The next thing to do is basically the same thing that is done in the thread I already mentioned above as it worked for them. However, they have an array named toTransform and I am not for sure where they got it from. I'm assuming that is their list of FFT values, but I have no clue how to even get the values! I've gone through the class files for the ComplexDoubleFFT and there is nowhere where it even returns its output. Hopefully the way I worded all of this isn't confusing. Any help is much appreciated!