#!/bin/sh # # /usr/bin/viavoice # Restore alsa mixer settings for ViaVoice and start dictation. # Mixer settings are restored from the first of these files found: # $HOME/viavoice/alsa.conf # /etc/asound.conf.viavoice # # Volker Kuhlmann # 9, 10 Sep; 10 Dec 2001; 3 Jan 2002 # mixerloaded= if alsactl 2>/dev/null; then for f in \ $HOME/viavoice/alsa.conf \ /etc/asound.conf.viavoice \ ; do if [ -r "$f" ]; then echo "Restoring mixer settings from $f" alsactl -f "$f" restore "$@" mixerloaded=1 break fi done else echo "Can't execute alsactl - unable to restore mixer settings." fi test -z "$mixerloaded" && echo \ "Can't find any mixer settings to restore, ensure mixer settings are correct or ViaVoice might not run too well." echo "" exec /usr/bin/vvstartdictation "$@"