File file = (File) flacFiles.get(i);
try {
FileInputStream is = new FileInputStream(file);
FLACDecoder decoder = new FLACDecoder(is);
decoder.readMetadata();
StreamInfo info = decoder.getStreamInfo();
if (masterStreamInfo == null) {
masterStreamInfo = info;
masterStreamInfo.setTotalSamples(0);
}
if (!info.compatiable(masterStreamInfo)) {
appendMsg("Bad StreamInfo " + file + ": " + info);
continue;
}
masterStreamInfo.addTotalSamples(info.getTotalSamples());
SeekPoint seekPoint = new SeekPoint(lastSampleNumber, lastStreamOffset, 0);
//decoder.processMetadata();
long frameStartOffs = decoder.getTotalBytesRead();
PackerFile aFile = new PackerFile(file, seekPoint, frameStartOffs);