completed music panes

This commit is contained in:
2017-04-21 10:25:24 -05:00
parent 8e205891f1
commit f1fb1adf47
6 changed files with 15 additions and 9 deletions

View File

@@ -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);
}
}