Mercurial > hg > silvet
changeset 313:fa2ffbb786df
Don't rely on column count to determine whether we've set the start time or not -- it could theoretically be 0 even after some input has appeared
author | Chris Cannam |
---|---|
date | Tue, 28 Apr 2015 11:09:31 +0100 |
parents | 796d403dc83b |
children | f98ba4f47e49 ad45b18427e0 |
files | .hgsubstate src/Silvet.cpp src/Silvet.h |
diffstat | 3 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgsubstate Tue Apr 28 10:02:36 2015 +0100 +++ b/.hgsubstate Tue Apr 28 11:09:31 2015 +0100 @@ -1,3 +1,3 @@ 7a48704e9a0fac1486240f9f7b7e31436a588064 bqvec -9106fb546452ef75de41a1ab8d97cc54ab763b5c constant-q-cpp +4d109d855c671c514dbc4947b0dae7cada112d8c constant-q-cpp d25a2e91e9d84aaff25e5d746398232d182d127d flattendynamics
--- a/src/Silvet.cpp Tue Apr 28 10:02:36 2015 +0100 +++ b/src/Silvet.cpp Tue Apr 28 11:09:31 2015 +0100 @@ -51,7 +51,8 @@ m_hqMode(true), m_fineTuning(false), m_instrument(0), - m_colsPerSec(50) + m_colsPerSec(50), + m_haveStartTime(false) { } @@ -465,13 +466,15 @@ m_columnCount = 0; m_resampledCount = 0; m_startTime = RealTime::zeroTime; + m_haveStartTime = false; } Silvet::FeatureSet Silvet::process(const float *const *inputBuffers, Vamp::RealTime timestamp) { - if (m_columnCount == 0) { + if (!m_haveStartTime) { m_startTime = timestamp; + m_haveStartTime = true; } vector<float> flattened(m_blockSize);