public RecordedFFT recordFFT(String pFilename) throws Exception {
FileInputStream fin = new FileInputStream(pFilename);
BufferedInputStream bin = new BufferedInputStream(fin);
FFTRecordingAudioProcessor processor = new FFTRecordingAudioProcessor();
JWFAudioDevice audioDevice = new JWFAudioDevice(processor);
Player player = new Player(bin, audioDevice);
try {
player.play();
}
finally {
processor.finish();
}
return processor.getFFT();