decodeSox() { commandline=(sox --single-threaded --temp "$tempdir") soxoptions_in='' soxoptions_out='' if (( ${destinationnormalize["$destination"]} )) then commandline+=(--norm) soxoptions_in+=' --norm' fi if [ -n "$1" ] then commandline+=("$1") else commandline+=("$sourcepath/$filename") fi if [ -n "${destinationfrequency["$destination"]}" ] \ && (( ${rate:-0} != ${destinationfrequency["$destination"]} )) then commandline+=(-r ${destinationfrequency["$destination"]}) soxoptions_out+=" -r ${destinationfrequency["$destination"]}" fi if [ -n "${destinationchannels["$destination"]}" ] \ && (( ${channels:-0} != ${destinationchannels["$destination"]} )) then commandline+=(-c ${destinationchannels["$destination"]}) soxoptions_out+=" -c ${destinationchannels["$destination"]}" fi tmpfile="$fileid${soxoptions_in// /}${soxoptions_out// /}" commandline+=("$tempdir/$tmpfile.wav") }