Greetings all.
I would like to have a mute toggle for my 'wave surround' channel, as
it's the slider for the rear speaker output jack on my sbLive! value. 
I've written a bash script to do it like this:
#-------------------------------------------------------------------------------
mute.sh
# Note: this must be run like ". mute.sh"
# Check if the Wave Surround level is already 0
VOL=`amixer sget 'Wave Surround' | grep 'Front Left:' | cut
--delimiter=' '  --fields=6`
if [ $VOL -gt 0 ]; then
        #mute
        #store the current wave surround volume in LASTVOL
        LASTVOL=`amixer sget 'Wave Surround' | grep 'Front Left:' | cut
--delimiter=' '  --fields=6`
        #turn the sound all the way down.
        amixer sset 'Wave Surround' 0
else
        #unmute
        amixer sset 'Wave Surround' $LASTVOL
fi
#--------------------------------------------------------------------------------
Maybe this will be usefull to someone out there.  Also, any
suggestions on how i could make this simpler / beter are welcome.  (
Like for example i should probably learn to use sed or awk instead of
piping through both grep and cut )

God Bless,
Brian


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
Alsa-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to