Showing the changes to python (1 of 1 file). Show all
Unified · Split
| @@ -7,9 +7,9 @@ s = aubio.source(sys.argv[1], samplerate, hop_size) · 6 unmodified lines | |||
| 7 | total_frames = 0 | 7 | total_frames = 0 |
| 8 | 8 | ||
| 9 | while True: # reading loop | 9 | while True: # reading loop |
| 10 | samples, read = s() | 10 | samples, read = s() |
| 11 | total_frames += read | 11 | total_frames += read |
| 12 | if read < hop_size: break # end of file reached | 12 | if read < hop_size: break # end of file reached |
| 13 | 13 | ||
| 14 | fmt_string = "read {:d} frames at {:d}Hz from {:s}" | 14 | fmt_string = "read {:d} frames at {:d}Hz from {:s}" |
| 15 | print (fmt_string.format(total_frames, s.samplerate, sys.argv[1])) | 15 | print (fmt_string.format(total_frames, s.samplerate, sys.argv[1])) |