#!/bin/bash
root=$(dirname $0)
fn=$(dirname $1)/$(basename $1 .hca)
b=$2

ext="mp3"

$root/hca.exe $1
while [ $? -ne 0 ]
do
        sleep 1;
        $root/hca.exe $1
done

/usr/bin/ffmpeg -loglevel warning -y -i $fn.wav -b:a 64k $fn"."$ext

rm $fn.wav

