From: Paul Brossier Date: Mon, 10 Mar 2014 19:06:19 +0000 (-0300) Subject: python/demos/demo_source_auto_samplerate.py: remove, demo_source.py is enough X-Git-Tag: 0.4.1~15 X-Git-Url: https://git.aubio.org/?a=commitdiff_plain;h=c05d61ffafcd0312c49d9855f5455afb124a322d;p=aubio.git python/demos/demo_source_auto_samplerate.py: remove, demo_source.py is enough --- diff --git a/python/demos/demo_source_auto_samplerate.py b/python/demos/demo_source_auto_samplerate.py deleted file mode 100755 index 1d45a6b6..00000000 --- a/python/demos/demo_source_auto_samplerate.py +++ /dev/null @@ -1,18 +0,0 @@ -#! /usr/bin/env python - -import sys -from aubio import source - -if __name__ == '__main__': - if len(sys.argv) < 2: - print 'usage: %s ' % sys.argv[0] - sys.exit(1) - 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 - print f.uri, "is", - print "%.2f seconds long at %.1fkHz" % (total_frames / float(samplerate), samplerate / 1000. )