I did the code up to finding the PCM Data from a audio file. How should i apply these data to the Fast Fourier Transform Algorithm? Are there more things to consider before applying the byte array to FFT algorithm.
public static void main(String[] args) throws FileNotFoundException, IOException {
ByteArrayOutputStream out = new ByteArrayOutputStream();
BufferedInputStream in = new BufferedInputStream(new FileInputStream("adios.wav"));
int read;
byte[] buff = new byte[1024];
while ((read = in.read(buff)) > 0)
{
out.write(buff, 0, read);
}
out.flush();
byte[] audioBytes = out.toByteArray();
for(int i=0; i<audioBytes.length;i++){
System.out.println(audioBytes[i]);
}
}