shithub: aubio

Download patch

ref: 04b31afc880f91a2687db5859dce318aad8412f5
parent: fb1c5e2054eb859d412e1e28cb9c045c8219854c
author: Paul Brossier <piem@piem.org>
date: Mon Oct 29 11:06:12 EDT 2018

[py] remove old slices from current list

--- a/python/lib/aubio/slicing.py
+++ b/python/lib/aubio/slicing.py
@@ -82,5 +82,8 @@
                 # write all the samples
                 _sink.do_multi(vec[:, start:read], read - start)
         total_frames += read
+        # remove old slices
+        slices = list(filter(lambda s: s['end_stamp'] > total_frames,
+            slices))
         if read < hopsize:
             break