projects
/
aubio.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f0ce8aa
)
[py] [slicing] add end of last region if missing
author
Paul Brossier
<piem@piem.org>
Mon, 29 Oct 2018 14:26:54 +0000
(15:26 +0100)
committer
Paul Brossier
<piem@piem.org>
Mon, 29 Oct 2018 14:26:54 +0000
(15:26 +0100)
python/lib/aubio/slicing.py
patch
|
blob
|
history
diff --git
a/python/lib/aubio/slicing.py
b/python/lib/aubio/slicing.py
index
a2a2519
..
2ca116e
100644
(file)
--- a/
python/lib/aubio/slicing.py
+++ b/
python/lib/aubio/slicing.py
@@
-18,7
+18,9
@@
def slice_source_at_stamps(source_file, timestamps, timestamps_end=None,
timestamps_end = [timestamps[1] - 1] + timestamps_end
if timestamps_end is not None:
- if len(timestamps_end) != len(timestamps):
+ if len(timestamps_end) == len(timestamps) - 1:
+ timestamps_end = timestamps_end + [_max_timestamp]
+ elif len(timestamps_end) != len(timestamps):
raise ValueError("len(timestamps_end) != len(timestamps)")
else:
timestamps_end = [t - 1 for t in timestamps[1:]] + [_max_timestamp]