projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fb1c5e2
)
[py] remove old slices from current list
author
Paul Brossier
<piem@piem.org>
Mon, 29 Oct 2018 14:06:12 +0000
(15:06 +0100)
committer
Paul Brossier
<piem@piem.org>
Mon, 29 Oct 2018 14:06:12 +0000
(15:06 +0100)
python/lib/aubio/slicing.py
patch
|
blob
|
history
diff --git
a/python/lib/aubio/slicing.py
b/python/lib/aubio/slicing.py
index
fa9d2e3
..
3f3602a
100644
(file)
--- a/
python/lib/aubio/slicing.py
+++ b/
python/lib/aubio/slicing.py
@@
-82,5
+82,8
@@
def slice_source_at_stamps(source_file, timestamps, timestamps_end=None,
# 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