public static boolean checkFileFormat(File file) {
		if (!file.exists() && !file.isFile())
			return false;
		try {
			AudioFormat format = AudioSystem.getAudioFileFormat(file)
					.getFormat();
			if ((format.getEncoding() == AudioFormat.Encoding.PCM_SIGNED || format
					.getEncoding() == AudioFormat.Encoding.PCM_UNSIGNED)
					&& format.getSampleSizeInBits() == BIT_DEPTH
					&& format.getSampleRate() == SAMPLE_RATE)
				return true;
		} catch (UnsupportedAudioFileException e) {
			System.err.println("error: unsupported audio format in file "
					+ file.getName());
		} catch (IOException e) {
			System.err.println("error: could not read file " + file.getName());
		}
		return false;
	}