Mercurial > hg > vamp-plugin-sdk
comparison examples/FixedTempoEstimator.cpp @ 202:e100112ecc06
* Remove debug
* Block size definitely too short
author | cannam |
---|---|
date | Sat, 11 Oct 2008 08:10:21 +0000 |
parents | 8e1b1fa94e15 |
children | 4275327f9c79 |
comparison
equal
deleted
inserted
replaced
201:8e1b1fa94e15 | 202:e100112ecc06 |
---|---|
109 } | 109 } |
110 | 110 |
111 size_t | 111 size_t |
112 FixedTempoEstimator::getPreferredBlockSize() const | 112 FixedTempoEstimator::getPreferredBlockSize() const |
113 { | 113 { |
114 return 64; | 114 return 128; |
115 } | 115 } |
116 | 116 |
117 bool | 117 bool |
118 FixedTempoEstimator::initialise(size_t channels, size_t stepSize, size_t blockSize) | 118 FixedTempoEstimator::initialise(size_t channels, size_t stepSize, size_t blockSize) |
119 { | 119 { |
371 for (int j = 1; j <= (n/2 - 1)/i; ++j) { | 371 for (int j = 1; j <= (n/2 - 1)/i; ++j) { |
372 m_fr[i] += m_r[i * j]; | 372 m_fr[i] += m_r[i * j]; |
373 ++div; | 373 ++div; |
374 } | 374 } |
375 */ | 375 */ |
376 std::cerr << "i = " << i << ", (n/2 - 1)/i = " << (n/2 - 1)/i << ", sum = " << m_fr[i] << ", div = " << div << ", val = " << m_fr[i] / div << ", t = " << lag2tempo(i) << std::endl; | 376 // std::cerr << "i = " << i << ", (n/2 - 1)/i = " << (n/2 - 1)/i << ", sum = " << m_fr[i] << ", div = " << div << ", val = " << m_fr[i] / div << ", t = " << lag2tempo(i) << std::endl; |
377 | 377 |
378 | 378 |
379 // m_fr[i] /= 1 + (n/2 - 1)/i; | 379 // m_fr[i] /= 1 + (n/2 - 1)/i; |
380 m_fr[i] /= div; | 380 m_fr[i] /= div; |
381 } | 381 } |