From 098925a5800c4d58193f26ff791594bd16fc674d Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Fri, 14 Feb 2014 19:20:46 -0300 Subject: [PATCH] python/demos/demo_pysoundcard_record.py: normalize downmixed signal --- python/demos/demo_pysoundcard_record.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/demos/demo_pysoundcard_record.py b/python/demos/demo_pysoundcard_record.py index ff9815c4..56a7fbc1 100755 --- a/python/demos/demo_pysoundcard_record.py +++ b/python/demos/demo_pysoundcard_record.py @@ -16,9 +16,9 @@ def record_sink(sink_path): while total_frames < duration * s.sample_rate: vec = s.read(hop_size) # mix down to mono - mono_vec = vec.sum(-1) + mono_vec = vec.sum(-1) / float(s.input_channels) g(mono_vec, hop_size) - total_frames += hop_size + total_frames += hop_size s.stop() if __name__ == '__main__': -- 2.11.0