Mercurial > hg > btrack
diff src/OnsetDetectionFunction.cpp @ 100:6aea5918992d
More code style updates
author | Adam Stark <adamstark.uk@gmail.com> |
---|---|
date | Sun, 13 Aug 2017 11:00:31 +0100 |
parents | 4aa362058011 |
children | 54c657d621dd |
line wrap: on
line diff
--- a/src/OnsetDetectionFunction.cpp Sat Aug 12 14:02:57 2017 +0100 +++ b/src/OnsetDetectionFunction.cpp Sun Aug 13 11:00:31 2017 +0100 @@ -181,14 +181,11 @@ double odfSample; // shift audio samples back in frame by hop size - for (int i = 0; i < (frameSize-hopSize);i++) - { - frame[i] = frame[i+hopSize]; - } + std::rotate (frame.begin(), frame.begin() + hopSize, frame.end()); // add new samples to frame from input buffer int j = 0; - for (int i = (frameSize-hopSize);i < frameSize;i++) + for (int i = (frameSize - hopSize); i < frameSize; i++) { frame[i] = buffer[j]; j++;