diff options
author | Bernhard Tittelbach <xro@realraum.at> | 2011-05-16 14:09:35 +0000 |
---|---|---|
committer | Bernhard Tittelbach <xro@realraum.at> | 2011-05-16 14:09:35 +0000 |
commit | af9375fb0953a81c158428bab2d407f66d419070 (patch) | |
tree | 8246d8b3df4a66491f86e931966a73759e94adda /software/tests | |
parent | soxdtmftest variable duration (diff) |
stop playing
git-svn-id: https://svn.spreadspace.org/mur.sat@24 7de4ea59-55d0-425e-a1af-a3118ea81d4c
Diffstat (limited to 'software/tests')
-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 |