try {
outputFile.delete();
buffer = ByteBuffer.allocate((int) Math.pow(2, 18));
tempBuf = new byte[(int) Math.pow(2, 15)];
encoder = IAPECompress.CreateIAPECompress();
WaveFormat format = new WaveFormat();
fillWaveFormat(format, fmt);
int level = CompressionLevel.COMPRESSION_LEVEL_NORMAL;
if (options != null) {
level = options.getInt("encoder.ape.level", level);
}