summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2014-09-26 17:31:53 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2014-09-26 17:31:53 +0200
commita7b72c46056ee49dac1b8c8b1f9d9ad6d4447d92 (patch)
tree34636f29f09bd77f9186a7fb0b9fd652ba8b7db3 /client
parent384b830f21ea2c9114e838aebd9222cfacfc6a31 (diff)
downloadjasper-client-a7b72c46056ee49dac1b8c8b1f9d9ad6d4447d92.tar.gz
jasper-client-a7b72c46056ee49dac1b8c8b1f9d9ad6d4447d92.zip
Close audio stream on passiveListen() early return
This fixes #33
Diffstat (limited to 'client')
-rw-r--r--client/mic.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/client/mic.py b/client/mic.py
index 444beea..eff5e72 100644
--- a/client/mic.py
+++ b/client/mic.py
@@ -142,6 +142,9 @@ class Mic:
# no use continuing if no flag raised
if not didDetect:
print "No disturbance detected"
+ stream.stop_stream()
+ stream.close()
+ audio.terminate()
return (None, None)
# cutoff any recording before this disturbance was detected