From 384b830f21ea2c9114e838aebd9222cfacfc6a31 Mon Sep 17 00:00:00 2001 From: schneefux Date: Fri, 26 Sep 2014 17:27:25 +0200 Subject: Close audio stream in fetchThreshold() --- client/mic.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'client') diff --git a/client/mic.py b/client/mic.py index 0351592..444beea 100644 --- a/client/mic.py +++ b/client/mic.py @@ -68,6 +68,10 @@ class Mic: lastN.append(self.getScore(data)) average = sum(lastN) / len(lastN) + stream.stop_stream() + stream.close() + audio.terminate() + # this will be the benchmark to cause a disturbance over! THRESHOLD = average * THRESHOLD_MULTIPLIER -- cgit v1.3.1