How to perform an FFT on a signal with a sampling rate of 44100? This is probably a very simple Signal Processing question but I can't quite work it out. I'm currently writing an android app which needs to perform an fft on audio data taken from the phone's microphone. I'm currently reading in the audio data into a byte array buffer at a sampling frequency of 44100Hz.

 int bufferSize = AudioRecord.getMinBufferSize(44100,
                        AudioFormat.CHANNEL_IN_STEREO, AudioFormat.ENCODING_PCM_16BIT);

                final AudioRecord recorder = new AudioRecord(MediaRecorder.AudioSource.MIC, 44100,
                        AudioFormat.CHANNEL_IN_STEREO, AudioFormat.ENCODING_PCM_16BIT,
                        bufferSize);

                final AudioTrack audioTrack = new AudioTrack(
                        AudioManager.STREAM_MUSIC, 44100,
                        AudioFormat.CHANNEL_IN_STEREO, AudioFormat.ENCODING_PCM_16BIT,
                        bufferSize, AudioTrack.MODE_STREAM);

                final byte[] buffer = new byte[bufferSize];
                final int finalBufferSize = bufferSize;


Once the buffer has been filled I convert the data to an array of Complex numbers and pass the data into an fft function. My problem is that the fft function I have cannot work with 44100 samples as it requires the length of the array of samples to be a power of 2. I've found what I think are some solutions online but I'm a little unsure if I'm fully understanding them correctly.

As I understand it I can either pad the array out with zeroes in order to make the array length a power of 2 or I can take a fixed fft size, e.g. 1024 samples. If I use the second solution do I need to divide the original array of samples into 1024 chunks and run an fft on each? Any advice on how I should go about this would be appreciated.

Here is the fft class I'm using:
http://introcs.cs.princeton.edu/java/97data/FFT.java.html
A 44100 Hz sample rate just means that you get 1 sample approximately every 22.67 microseconds. It also means you get N samples in N*22.67 microseconds, and you're free to choose N. If you choose N=44100, you get 44100 samples in one second. If you choose N=1024, you get 1024 samples in 23.22 milliseconds.