Mercurial > hg > segmenter-vamp-plugin
changeset 33:325cc75df35a slimline
Fix crash on silent input
author | Chris Cannam |
---|---|
date | Fri, 11 May 2012 16:59:14 +0100 |
parents | 28aafd0c1a5d |
children | f2db60706075 |
files | songparts/SongParts.cpp |
diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/songparts/SongParts.cpp Fri May 11 16:30:34 2012 +0100 +++ b/songparts/SongParts.cpp Fri May 11 16:59:14 2012 +0100 @@ -1452,6 +1452,8 @@ { int len = partlengths(iLength); int nUsedBeat = nBeat - len + 1; // number of potential rep beginnings: they can't overlap at the end of the song + + if (nUsedBeat < 1) continue; for (int iBeat = 0; iBeat < nUsedBeat; ++ iBeat) // looping over all columns (arbitrarily chosen columns) { @@ -1649,7 +1651,7 @@ { Part newPart; newPart.n = nBeat; - newPart.indices.push_back(1); + newPart.indices.push_back(0); newPart.letter = 'A'; newPart.value = 1; newPart.level = 1;