From: Paul Brossier Date: Sat, 22 Feb 2014 20:03:46 +0000 (-0300) Subject: python/demos/demo_source_auto_samplerate.py: define hop_size X-Git-Tag: 0.4.1~41 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=1cc78e7e730d8c9788b146d630a088b12d6e86dc;p=aubio.git python/demos/demo_source_auto_samplerate.py: define hop_size --- 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