}
} while (!metadata.isLast());
metaDataLength = (int) decoder.getTotalBytesRead();
duration = (int) (streamInfo.getTotalSamples() * 1000.0 / streamInfo.getSampleRate());
bitrate = (int) (((in.getLength() - metaDataLength) * 8.0) / (streamInfo.getTotalSamples() / streamInfo.getSampleRate()));
audioInfo = new AudioInfo("FLAC", true, bitrate / 1000, streamInfo.getSampleRate(), streamInfo.getChannels(), in.getLength(), getDuration());
fmt = new AudioFormat(streamInfo.getSampleRate(), 16, streamInfo.getChannels(), true, false);
} catch (Exception e) {
e.printStackTrace();
}
}