#! /bin/sh
##
## vboxplay v2.0.0BETA5 (17-NOV-98)

#----------------------------------------------------------------------------#
# Usage: vboxplay SAMPLENAME [ VOLUME ]                                      #
#----------------------------------------------------------------------------#

SAMPLE=$1
VOLUME=$2
if [ "$VOLUME" == "" ]; then
   VOLUME=5;
fi


   # Replace this with your own play command. You also can use the pvftools
   # (or some other) to convert and play the messages.

# DOPLAY="/usr/local/bin/auplay -audio localhost:0 -volume $VOLUME"
DOPLAY="/usr/bin/play -t au -v $VOLUME -"

'/usr/bin'/vboxmode $SAMPLE

case $? in

   2|3|4|6) '/usr/bin'/vboxtoau <$SAMPLE | $DOPLAY
            ;;
         *) echo "$0: unknown vbox message format!"
            ;;
esac

# Example with pvftools:
#
# vboxtoau <$SAMPLE | \
#           autopvf | \
#           pvfamp $VOLUME | \
#           pvfcut 0.20 | \
#           pvftoau 8000 | \
#           auplay
