5 echo "Usage: $0 flacfile [flacfile [flacfile ...]]" >&2
11 samplerate
="$(metaflac --show-sample-rate "$1")"
12 bitdepth
="$(metaflac --show-bps "$1")"
13 if ! [ "$samplerate" = 44100 -o "$samplerate" = 4800 -a $bitdepth = 16 ]
15 tfile
="$(mktemp --tmpdir --suffix=.flac)"
16 sox
"$1" -r 44100 -b 16 "$tfile"