Changeset 689106e for python/tests/test_source.py
- Timestamp:
- Apr 18, 2016, 11:24:47 PM (8 years ago)
- 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:
- 6db7600
- Parents:
- 1c6fe64
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
python/tests/test_source.py
r1c6fe64 r689106e 39 39 total_frames += read 40 40 if read < f.hop_size: break 41 print "read", "%.2fs" % (total_frames / float(f.samplerate) ),42 print "(", total_frames, "frames", "in",43 print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")",44 print "from", f.uri41 print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ), 42 print ("(", total_frames, "frames", "in" ), 43 print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ), 44 print ("from", f.uri) 45 45 return total_frames 46 46 … … 68 68 try: 69 69 f = source(p, -1) 70 except ValueError ,e:70 except ValueError as e: 71 71 pass 72 72 else: … … 77 77 try: 78 78 f = source(p, 0, -1) 79 except ValueError ,e:79 except ValueError as e: 80 80 pass 81 81 else: … … 109 109 total_frames += read 110 110 if read < f.hop_size: break 111 print "read", "%.2fs" % (total_frames / float(f.samplerate) ),112 print "(", total_frames, "frames", "in",113 print f.channels, "channels and",114 print total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")",115 print "from", f.uri111 print ("read", "%.2fs" % (total_frames / float(f.samplerate) ) ), 112 print ("(", total_frames, "frames", "in" ), 113 print (f.channels, "channels and" ), 114 print (total_frames / f.hop_size, "blocks", "at", "%dHz" % f.samplerate, ")" ), 115 print ("from", f.uri) 116 116 return total_frames 117 117
Note: See TracChangeset
for help on using the changeset viewer.