From a7b72c46056ee49dac1b8c8b1f9d9ad6d4447d92 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 26 Sep 2014 17:31:53 +0200 Subject: Close audio stream on passiveListen() early return This fixes #33 --- client/mic.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'client') 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 -- cgit v1.3.1