projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e1703b3
)
interfaces/python/demo_source.py: use source samplerate
author
Paul Brossier
<piem@piem.org>
Fri, 27 Jul 2012 17:34:40 +0000
(11:34 -0600)
committer
Paul Brossier
<piem@piem.org>
Fri, 27 Jul 2012 17:34:40 +0000
(11:34 -0600)
interfaces/python/demo_source.py
patch
|
blob
|
history
diff --git
a/interfaces/python/demo_source.py
b/interfaces/python/demo_source.py
index 5c91236ef6a47f53960e207ec08e8a578282d9a2..d4f9de10fe616b165ce5dcd270953f1e6bb3ac08 100755
(executable)
--- a/
interfaces/python/demo_source.py
+++ b/
interfaces/python/demo_source.py
@@
-7,9
+7,10
@@
if __name__ == '__main__':
if len(sys.argv) < 2:
print 'usage: %s <inputfile>' % sys.argv[0]
sys.exit(1)
- f = source(sys.argv[1], 8000, 256)
+ f = source(sys.argv[1], 1, 256)
+ samplerate = f.get_samplerate()
total_frames, read = 0, 256
while read:
vec, read = f()
total_frames += read
- print "read", total_frames / float(
f.
samplerate), "seconds from", f.uri
+ print "read", total_frames / float(samplerate), "seconds from", f.uri