From af9375fb0953a81c158428bab2d407f66d419070 Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Mon, 16 May 2011 14:09:35 +0000 Subject: stop playing git-svn-id: https://svn.spreadspace.org/mur.sat@24 7de4ea59-55d0-425e-a1af-a3118ea81d4c --- software/tests/dtmf/soxdtmftest.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) (limited to 'software/tests/dtmf') 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 # @@ -29,7 +29,14 @@ # along with mur.sat. If not, see . # -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 -- cgit v1.2.3