I'm working with Java sound for a senior project at my college. None of the professors here have a good grasp on audio programming and I'm mostly self taught.
The work I'm doing now is using Java Sound to write an Android App that records, plays and analyzes sound. I've got the recorder and player up and running, but I'm stuck on the data analysis. I've done a lot of research on the internet and I still don't quite understand if I'm analyzing the data correctly. From this website along with many others, I've come to realize that getting a sound sample out of a sound byte array (taken from a microphone source with 16-but signed sound) should look like this:
low = (int) data[aByte++] & 0xff;
high = (int) data[aByte++] << 8;
sample = high | low;
After gathering a large array of samples that is a length to a power of 2 I pass it to an FFT. The output of my FFT values right now seem really off and I'm not sure how to check them. So I'm starting back at the basis of my logic to make sure I'm calling the FFT correctly.
My question is this:
Is it customary for a lot of the audio samples to be negative before entering the FFT? I seem to have a lot of samples that are negatively signed and I'm worried that's what is messing up my FFT results.
Any help or advice on where I can go to learn more would be much appreciated! Thanks.
Edited by: 968579 on Oct 30, 2012 10:30 PM