aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkrtaylor <krtaylor@krtaylor-ThinkPad-T61p.(none)>2012-01-24 16:38:58 -0600
committerkrtaylor <krtaylor@krtaylor-ThinkPad-T61p.(none)>2012-01-24 16:38:58 -0600
commite80f3d70954e9aa5e21cad088dab8c67a4ec48dc (patch)
tree385cf4b0d6ef6ddb3a731167eb1dab27e5e82d4a
parenta1b522dc2465854a5fcc26568b19f8274246fdc7 (diff)
downloade2eaudiotest-e80f3d70954e9aa5e21cad088dab8c67a4ec48dc.tar.gz
Stop sound when script exits - thanks to Andy Doan
-rwxr-xr-xe2eaudiotest.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/e2eaudiotest.sh b/e2eaudiotest.sh
index 2b5a87d..bcc65ed 100755
--- a/e2eaudiotest.sh
+++ b/e2eaudiotest.sh
@@ -1,6 +1,8 @@
#play a sine wave at A 440 hz
speaker-test -t sine -f 440 -l 1 &
+STPID=$!
+trap "kill $STPID" TERM INT EXIT
# check the loopback frequency
if ./testfreq ; then