@Override
public boolean open(File outputFile, AudioFormat fmt, Configuration options) {
try {
this.fmt = fmt;
encoder = new javaFlacEncoder.FLACEncoder();
StreamConfiguration streamConfiguration = new StreamConfiguration();
streamConfiguration.setBitsPerSample(fmt.getSampleSizeInBits());
streamConfiguration.setChannelCount(fmt.getChannels());
streamConfiguration.setSampleRate((int) fmt.getSampleRate());
encoder.setStreamConfiguration(streamConfiguration);
EncodingConfiguration encodingConfiguration = new EncodingConfiguration();
encoder.setEncodingConfiguration(encodingConfiguration);