shithub: aubio

Download patch

ref: 1cc78e7e730d8c9788b146d630a088b12d6e86dc
parent: 9aa0af35744daa2d1f1329204902edb8e195dcb4
author: Paul Brossier <piem@piem.org>
date: Sat Feb 22 12:03:46 EST 2014

python/demos/demo_source_auto_samplerate.py: define hop_size

--- a/python/demos/demo_source_auto_samplerate.py
+++ b/python/demos/demo_source_auto_samplerate.py
@@ -7,9 +7,10 @@
   if len(sys.argv) < 2:
     print 'usage: %s <inputfile>' % 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