Posts

Showing posts with the label Audio

[Level 3] Control Audio Device.

My laptop will always beep on while boot, and I cannot use the command "xset -b" to turn it off. On community friend( evereasy ) told me that I can use the command "audioctl" to control it. Then I wrote a sample script for it. #!/usr/bin/bash showUsage() {   cat < <EOF Usage:   $0 device [display]   $0 device control value Ex.   $0 $sSampleDevice   $0 $sSampleDevice beep 0 Device: `listDevice | sed -e 's/^/  /'` Control($sSampleDevice): `showControl $sSampleDevice | awk '{print($2)}' | tail +1 | sed -e 's/^/  /'` EOF } listDevice() {   #echo "audioctl list-devices ..."   audioctl list-devices } showDevice() {   #echo "audioctl show-devices ..."   sDevice=$1   audioctl show-device -v -d $sDevice } showControl() {   #echo "audioctl show-control ..."   sDevice=$1   audioctl show-control -v -d $sDevice } alias audioctl='/usr/bin/audioctl' sSampleDevice=`listDevi...