https://sites.google.com/site/piotrwend ... transforms
Once you have the results of the FFT you take the absolute value of it and then do something else to get the frequency, but right now I'm mainly concerned with doing the FFT itself.
I am new to android development. Could anyone show me how to perform the FFT on the audio buffer? Thanks.
I think you get the buffer like this:
- Code: Select all
int channel_config = AudioFormat.CHANNEL_CONFIGURATION_MONO;
int format = AudioFormat.ENCODING_PCM_16BIT;
int sampleSize = 8000;
int bufferSize = AudioRecord.getMinBufferSize(sampleSize, channel_config, format);
AudioRecord audioInput = new AudioRecord(AudioSource.MIC, sampleSize, channel_config, format, bufferSize);
short audioBuffer = new short[bufferSize];