comparison dsp/onsets/DetectionFunction.cpp @ 106:f976d7609700 mirex2013

Restore the accidentally-removed line in which all the work happens! Fixes onset detector
author Chris Cannam
date Thu, 05 Sep 2013 12:33:35 +0100
parents 37449f085a4c
children f3c69325cca2
comparison
equal deleted inserted replaced
105:c32a2446f7fe 106:f976d7609700
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) {