#!/bin/bash

	# this version works with ALSA. hacked out on debian/woody, but
	# should work anywhere.

. /etc/jogdiald/functions

function update_volume_inf() {
    read_volume
    draw_lables "Volume($VOLUME%)" "$VOLUME" 0 100
}

update_volume_inf

read press
echo "OK"

while read cmd arg; do
  case $cmd in
    PRESS)  exit 0;;
    TURN)   $AUMIX $CHANNEL `expr $VOLUME + $arg \* 10`
	    update_volume_inf
    ;;
  esac
done
