#!/bin/bash

if [[ "$1" == "convert" ]]; then
  ffmpeg -i "$2" -acodec pcm_s16le -ac 1 "$3".wav
  sox "$3".wav -e signed -b 16 "$3" channels 1 rate 44100
  rm "$3".wav
else
if [[ "$1" == "check" ]]; then
    diff -s "$2" "$3"
else
  aplay -r 44100 -f s16_le "$1"
fi
fi
