# HG changeset patch # User Chris Cannam # Date 1541431879 0 # Node ID bd084c486076ce9181f02517017a7635fec96867 # Parent 9de7d3bcf7e3b1ebbba5d03e6566f46c0e65171b Fix incorrect time alignment of tonal-change plugin outputs. This bug was introduced in December 2008, so we are squashing it just before its tenth birthday. diff -r 9de7d3bcf7e3 -r bd084c486076 plugins/TonalChangeDetect.cpp --- a/plugins/TonalChangeDetect.cpp Tue May 15 15:43:15 2018 +0100 +++ b/plugins/TonalChangeDetect.cpp Mon Nov 05 15:31:19 2018 +0000 @@ -104,7 +104,7 @@ int TonalChangeDetect::getPluginVersion() const { - return 2; + return 3; } std::string TonalChangeDetect::getCopyright() const @@ -314,6 +314,7 @@ TonalChangeDetect::FeatureSet TonalChangeDetect::process(const float *const *inputBuffers, + Vamp::RealTime timestamp) { if (!m_chromagram) { @@ -323,7 +324,10 @@ return FeatureSet(); } - if (!m_haveOrigin) m_origin = timestamp; + if (!m_haveOrigin) { + m_origin = timestamp; + m_haveOrigin = true; + } // convert float* to double* double *tempBuffer = new double[m_block];