Mercurial > hg > match-vamp
comparison src/FeatureExtractor.cpp @ 201:2fed1f101172
Another process wrapper
author | Chris Cannam |
---|---|
date | Fri, 27 Feb 2015 10:44:13 +0000 |
parents | 487261a22b18 |
children | 175c8f044e7c |
comparison
equal
deleted
inserted
replaced
200:f6be68852c1d | 201:2fed1f101172 |
---|---|
177 | 177 |
178 return processMags(mags); | 178 return processMags(mags); |
179 } | 179 } |
180 | 180 |
181 feature_t | 181 feature_t |
182 FeatureExtractor::process(const float *real, const float *imag) | |
183 { | |
184 vector<float> mags(m_params.fftSize/2 + 1, 0.0); | |
185 | |
186 for (int i = 0; i <= m_params.fftSize/2; i++) { | |
187 mags[i] = real[i] * real[i] + imag[i] * imag[i]; | |
188 } | |
189 | |
190 return processMags(mags); | |
191 } | |
192 | |
193 feature_t | |
182 FeatureExtractor::process(const float *cframe) | 194 FeatureExtractor::process(const float *cframe) |
183 { | 195 { |
184 vector<float> mags(m_params.fftSize/2 + 1, 0.0); | 196 vector<float> mags(m_params.fftSize/2 + 1, 0.0); |
185 | 197 |
186 for (int i = 0; i <= m_params.fftSize/2; i++) { | 198 for (int i = 0; i <= m_params.fftSize/2; i++) { |