Changeset 5314432


Ignore:
Timestamp:
Jul 27, 2012, 7:34:40 PM (12 years ago)
Author:
Paul Brossier <piem@piem.org>
Branches:
feature/autosink, feature/cnn, feature/cnn_org, feature/constantq, feature/crepe, feature/crepe_org, feature/pitchshift, feature/pydocstrings, feature/timestretch, fix/ffmpeg5, master, pitchshift, sampler, timestretch, yinfft+
Children:
fc117d0
Parents:
e1703b3
Message:

interfaces/python/demo_source.py: use source samplerate

File:
1 edited

Legend:

Unmodified
Added
Removed
  • interfaces/python/demo_source.py

    re1703b3 r5314432  
    88    print 'usage: %s <inputfile>' % sys.argv[0]
    99    sys.exit(1)
    10   f = source(sys.argv[1], 8000, 256)
     10  f = source(sys.argv[1], 1, 256)
     11  samplerate = f.get_samplerate()
    1112  total_frames, read = 0, 256
    1213  while read:
    1314    vec, read = f()
    1415    total_frames += read
    15   print "read", total_frames / float(f.samplerate), "seconds from", f.uri
     16  print "read", total_frames / float(samplerate), "seconds from", f.uri
Note: See TracChangeset for help on using the changeset viewer.