Mercurial > hg > vamp-tempogram
changeset 45:e6a43500629b
I think that the tempogram max lag can't exceed the window length - 1, rather than the window length, because it is used as an index into a vector of the window length
| author | Chris Cannam | 
|---|---|
| date | Thu, 25 Sep 2014 18:42:35 +0100 | 
| parents | a908a5a56267 | 
| children | eafb3a7f80fb | 
| files | TempogramPlugin.cpp | 
| diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] | 
line wrap: on
 line diff
--- a/TempogramPlugin.cpp Thu Sep 25 15:42:15 2014 +0100 +++ b/TempogramPlugin.cpp Thu Sep 25 18:42:35 2014 +0100 @@ -635,7 +635,7 @@ } m_tempogramMinLag = max((int)ceil((60/(m_inputStepSize * m_tempogramMaxBPM))*m_inputSampleRate), 0); - m_tempogramMaxLag = min((int)floor((60/(m_inputStepSize * m_tempogramMinBPM))*m_inputSampleRate), (int)m_tempogramWindowLength); + m_tempogramMaxLag = min((int)floor((60/(m_inputStepSize * m_tempogramMinBPM))*m_inputSampleRate), (int)m_tempogramWindowLength-1); if (m_tempogramMaxLag < m_tempogramMinLag) { cerr << "At audio sample rate " << m_inputSampleRate
