comparison src/Silvet.cpp @ 58:d00a6f6c7fc9

Comment
author Chris Cannam
date Tue, 08 Apr 2014 17:45:26 +0100
parents 49c0a139f165
children 3e7e3c610fae
comparison
equal deleted inserted replaced
57:49c0a139f165 58:d00a6f6c7fc9
433 433
434 int spacing = processingSampleRate / 100; 434 int spacing = processingSampleRate / 100;
435 435
436 Grid out; 436 Grid out;
437 437
438 //!!! nb we count the CQ latency in terms of processing hops, but 438 // We count the CQ latency in terms of processing hops, but
439 //!!! actually it isn't guaranteed to be an exact number (in fact 439 // actually it probably isn't an exact number of hops so this
440 //!!! it probably isn't) so this is imprecise -- fix 440 // isn't quite accurate. But the small constant offset is
441 // practically irrelevant compared to the jitter from the 40ms
442 // frame size we reduce to in a moment
441 int latentColumns = m_cq->getLatency() / m_cq->getColumnHop(); 443 int latentColumns = m_cq->getLatency() / m_cq->getColumnHop();
442 444
443 for (int i = 0; i < width; ++i) { 445 for (int i = 0; i < width; ++i) {
444 446
445 if (m_columnCount < latentColumns) { 447 if (m_columnCount < latentColumns) {
479 outCol[j] = std::max(outCol[j] - noiseLevel2[j], 0.0); 481 outCol[j] = std::max(outCol[j] - noiseLevel2[j], 0.0);
480 } 482 }
481 483
482 // then we only use every fourth filtered column, for 25 484 // then we only use every fourth filtered column, for 25
483 // columns per second in the eventual grid 485 // columns per second in the eventual grid
484 //!!! why, if we're filtering the time columns, don't we just
485 // reduce to this frame rate before filtering at all?
486 486
487 if (m_reducedColumnCount % 4 == 0) { 487 if (m_reducedColumnCount % 4 == 0) {
488 out.push_back(outCol); 488 out.push_back(outCol);
489 } 489 }
490 490