Mercurial > hg > nnls-chroma
comparison NNLSBase.cpp @ 150:c40de221b5df
Merge
author | Chris Cannam |
---|---|
date | Thu, 05 Sep 2013 17:30:38 +0100 |
parents | a85e745c0721 |
children | d95c4cdef8af |
comparison
equal
deleted
inserted
replaced
149:d0ea842539a9 | 150:c40de221b5df |
---|---|
463 if (cumenergy < energysum * m_rollon / 100) magnitude[iBin-2] = 0; | 463 if (cumenergy < energysum * m_rollon / 100) magnitude[iBin-2] = 0; |
464 else break; | 464 else break; |
465 } | 465 } |
466 } | 466 } |
467 | 467 |
468 if (maxmag < 2) { | 468 if (maxmag < m_blockSize * 2.0 / 16384.0) { // this is not quite right, I think |
469 // cerr << "timestamp " << timestamp << ": very low magnitude, setting magnitude to all zeros" << endl; | 469 // cerr << "timestamp " << timestamp << ": very low magnitude, setting magnitude to all zeros" << endl; |
470 for (int iBin = 0; iBin < static_cast<int>(m_blockSize/2); iBin++) { | 470 for (int iBin = 0; iBin < static_cast<int>(m_blockSize/2); iBin++) { |
471 magnitude[iBin] = 0; | 471 magnitude[iBin] = 0; |
472 } | 472 } |
473 } | 473 } |