From 1cc78e7e730d8c9788b146d630a088b12d6e86dc Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Sat, 22 Feb 2014 17:03:46 -0300 Subject: [PATCH] python/demos/demo_source_auto_samplerate.py: define hop_size --- python/demos/demo_source_auto_samplerate.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/python/demos/demo_source_auto_samplerate.py b/python/demos/demo_source_auto_samplerate.py index 31ba55af..1d45a6b6 100755 --- a/python/demos/demo_source_auto_samplerate.py +++ b/python/demos/demo_source_auto_samplerate.py @@ -7,9 +7,10 @@ if __name__ == '__main__': if len(sys.argv) < 2: print 'usage: %s ' % sys.argv[0] sys.exit(1) - f = source(sys.argv[1], 0, 256) - samplerate = f.get_samplerate() - total_frames, read = 0, 256 + hop_size = 512 + f = source(sys.argv[1], 0, hop_size) + samplerate = f.samplerate + total_frames, read = 0, hop_size while read: vec, read = f() total_frames += read -- 2.11.0