Mercurial > hg > segmenter-vamp-plugin
changeset 24:9e496d4732a7 slimline
temp -> new in variable name prefix (clearer about intention)
author | Chris Cannam |
---|---|
date | Thu, 10 May 2012 12:01:54 +0100 |
parents | cb9003bb0251 |
children | 767ab745c582 |
files | songparts/SongParts.cpp |
diffstat | 1 files changed, 6 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/songparts/SongParts.cpp Thu May 10 11:51:32 2012 +0100 +++ b/songparts/SongParts.cpp Thu May 10 12:01:54 2012 +0100 @@ -1099,12 +1099,12 @@ for (int iChroma = 0; iChroma < nChromaFrame; ++iChroma) { Vamp::RealTime frameTimestamp = chromagram[iChroma].timestamp; - Vamp::RealTime tempBeatTimestamp; + Vamp::RealTime newBeatTimestamp; - if (currBeatCount != beats.size()-1) tempBeatTimestamp = beats[currBeatCount+1].timestamp; - else tempBeatTimestamp = chromagram[nChromaFrame-1].timestamp; + if (currBeatCount != beats.size()-1) newBeatTimestamp = beats[currBeatCount+1].timestamp; + else newBeatTimestamp = chromagram[nChromaFrame-1].timestamp; - if (frameTimestamp > tempBeatTimestamp || + if (frameTimestamp > newBeatTimestamp || iChroma == nChromaFrame-1) { // new beat (or last chroma frame) @@ -1118,7 +1118,7 @@ bwQchromaFrame.hasTimestamp = true; bwQchromaFrame.timestamp = beatTimestamp; bwQchromaFrame.values = tempChroma; - bwQchromaFrame.duration = tempBeatTimestamp - beatTimestamp; + bwQchromaFrame.duration = newBeatTimestamp - beatTimestamp; bwQchromagram.push_back(bwQchromaFrame); for (int iFrame = -framesInBeat; iFrame < 0; ++iFrame) @@ -1132,7 +1132,7 @@ // 2. increments / resets for current (new) beat currBeatCount++; - beatTimestamp = tempBeatTimestamp; + beatTimestamp = newBeatTimestamp; for (size_t i = 0; i < nBin; ++i) tempChroma[i] = 0; // average framesInBeat = 0; }