Changeset 6f27719 for python/lib


Ignore:
Timestamp:
Jan 12, 2014, 4:28:49 AM (11 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:
a4ec189
Parents:
aee840b
Message:

python/lib/aubio/slicing.py: improve slicing, make tests faster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • python/lib/aubio/slicing.py

    raee840b r6f27719  
    3838        remaining = next_stamp - total_frames
    3939        # not enough frames remaining, time to split
    40         if remaining <= read:
     40        if remaining < read:
    4141            if remaining != 0:
    4242                # write remaining samples from current region
     
    4848            #print "new slice", total_frames, "+", remaining, "=", next_stamp
    4949            g = sink(new_sink_path, samplerate)
    50             if remaining != read:
    51                 # write the remaining samples in the new file
    52                 g(vec[remaining:read], read - remaining)
     50            # write the remaining samples in the new file
     51            g(vec[remaining:read], read - remaining)
    5352            if len(timestamps):
    5453                next_stamp = int(timestamps.pop(0))
     
    6059        if read < hopsize: break
    6160
     61    # close the last file
    6262    del g
Note: See TracChangeset for help on using the changeset viewer.