public static double[] readAudioFile(
	File audioFile,
	float sampleRate )
	throws IOException, UnsupportedAudioFileException
{
	AudioInputStream audioStream = AudioSystem.getAudioInputStream(audioFile);
	AudioFormat audioFormat = 
		new AudioFormat(sampleRate, 16, 1, true, true);
	 DataInputStream dataStream =
		 new DataInputStream(
			 new BufferedInputStream(
				 AudioSystem.getAudioInputStream(audioFormat, audioStream)));
	int m = (int) audioStream.getFrameLength();
	double[] audioData = new double[m];
	for ( int i = 0; i < m; ++i )
		audioData[i] = dataStream.readShort() / ((double) - Short.MIN_VALUE);
	return(audioData);
}