diff options
Diffstat (limited to 'software/tests/dtmf')
-rwxr-xr-x | software/tests/dtmf/soxdtmftest.sh | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/software/tests/dtmf/soxdtmftest.sh b/software/tests/dtmf/soxdtmftest.sh index 5520c07..e3d89da 100755 --- a/software/tests/dtmf/soxdtmftest.sh +++ b/software/tests/dtmf/soxdtmftest.sh @@ -9,7 +9,7 @@ # ESC im Labor and realraum. # # Please visit the project hompage at sat.mur.at for further information. -# +# # # Copyright (C) 2011 Bernhard Tittelbach <xro@realraum.at> # @@ -29,7 +29,14 @@ # along with mur.sat. If not, see <http://www.gnu.org/licenses/>. # -typeset -i DURATION=${1:-5} +setopt extendedglob + +function killchilds +{ + for childspec (${jobstates}) print kill ${${childspec[(s/:/w)5]}%%\=*}; +} + +typeset -i DURATION=${1:-10} CMD="play -n synth $DURATION" while true; do read -k 1 DIGIT @@ -50,5 +57,8 @@ while true; do b) ${=CMD} sin 770 sin 1633 & ;; c) ${=CMD} sin 852 sin 1633 & ;; d) ${=CMD} sin 941 sin 1633 & ;; + s) killchilds ;; + ' ') killchilds ;; + q) killchilds; exit 0 ;; esac done |