#!/bin/bash

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


# Sound and functions
AUMIX='/usr/bin/aumix'
CHANNEL=' -v'
WRAPPER='/usr/bin/soundwrapper'
MPG_PLAYER='/usr/bin/xmms'


function read_volume() {
    VOLUME=`$AUMIX $CHANNEL q | cut -d ' ' -f 3 | tr -d ','`
}

function redraw_up_down() {
    echo "LABEL_UP +"
    echo "LABEL_DOWN -"
}

function draw_lables() {
    LUP='+';
    LDOWN='-';
    if [ $2 -eq $3 ] || [ $2 -lt $3 ]; then LDOWN=' ';
    elif [ $2 -eq $4 ] || [ $2 -gt $4 ]; then LUP=' ';
    fi
    echo "LABEL $1"
    echo "LABEL_UP $LUP"
    echo "LABEL_DOWN $LDOWN"
    echo "OK"
}
