#!/bin/sh
# Shell script to play sound files to unix style sound devices.
# Should auto detect most supported systems and play the file for you.

if [ "$1" = "" ] ; then
  echo "play v1.0 - front end to Sox"
  echo "Usage: [ fopts ] infile
  echo "fopts: -r rate -c channels -s/-u/-U/-A -b/-w/-l/-f/-d/-D -x
  exit
fi

arch=`uname -s`

if [ "$arch" = "SunOS" ]; then
  sox $@ -t sunau /dev/audio
else
  if [ "$arch" = "Linux" ]; then
    sox $@ -t au /dev/audio
  fi
fi
