completed music panes
This commit is contained in:
@@ -13,9 +13,11 @@ public class WavInfo {
|
||||
private int byteRate;
|
||||
private FileInputStream audioFile;
|
||||
private DataInputStream readStream;
|
||||
private String fileName;
|
||||
|
||||
public WavInfo(File file) throws InvalidParameterException {
|
||||
try {
|
||||
fileName = file.getName();
|
||||
audioFile = new FileInputStream(file);
|
||||
initDataStream();
|
||||
getHeaderInfo();
|
||||
@@ -58,8 +60,10 @@ public class WavInfo {
|
||||
|
||||
readStream.skipBytes(38); //38
|
||||
|
||||
// System.out.println(readBytesToString(4).equals("data"));
|
||||
|
||||
if (!readBytesToString(4).equals("data")) { // 4
|
||||
throw new InvalidParameterException("initial data section tag not found");
|
||||
throw new InvalidParameterException("initial data section tag not found on wav: " + fileName);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user