Mercurial > hg > qm-dsp
comparison dsp/onsets/DetectionFunction.cpp @ 331:6dd7c8bb5e3a
Restore the accidentally-removed line in which all the work happens! Fixes onset detector
| author | Chris Cannam <c.cannam@qmul.ac.uk> | 
|---|---|
| date | Thu, 05 Sep 2013 12:33:35 +0100 | 
| parents | 31f22daeba64 | 
| children | f3c69325cca2 | 
   comparison
  equal
  deleted
  inserted
  replaced
| 330:3f7b4b282df1 | 331:6dd7c8bb5e3a | 
|---|---|
| 98 // If we have to use this implementation (as opposed to the | 98 // If we have to use this implementation (as opposed to the | 
| 99 // version of process() below that operates on frequency domain | 99 // version of process() below that operates on frequency domain | 
| 100 // data directly), we will have to use the next smallest power of | 100 // data directly), we will have to use the next smallest power of | 
| 101 // two from the block size. Results may vary accordingly! | 101 // two from the block size. Results may vary accordingly! | 
| 102 | 102 | 
| 103 int actualLength = MathUtilities::previousPowerOfTwo(m_dataLength); | 103 int actualLength = MathUtilities::previousPowerOfTwo((int)m_dataLength); | 
| 104 | 104 | 
| 105 if (actualLength != (int)m_dataLength) { | 105 if (actualLength != (int)m_dataLength) { | 
| 106 // Pre-fill mag and phase vectors with zero, as the FFT output | 106 // Pre-fill mag and phase vectors with zero, as the FFT output | 
| 107 // will not fill the arrays | 107 // will not fill the arrays | 
| 108 for (int i = actualLength/2; i < (int)m_dataLength/2; ++i) { | 108 for (int i = actualLength/2; i < (int)m_dataLength/2; ++i) { | 
