comparison dsp/segmentation/ClusterMeltSegmenter.cpp @ 339:9c8ee77db9de

Tidy real-to-complex FFT -- forward and inverse have different arguments, so make them separate functions; document
author Chris Cannam <c.cannam@qmul.ac.uk>
date Wed, 02 Oct 2013 15:04:38 +0100
parents d5014ab8b0e5
children e4a57215ddee
comparison
equal deleted inserted replaced
338:35db1b24a848 339:9c8ee77db9de
207 frame[i + fftsize/2] = value; 207 frame[i + fftsize/2] = value;
208 } 208 }
209 209
210 window->cut(frame); 210 window->cut(frame);
211 211
212 fft->process(false, frame, real, imag); 212 fft->forward(frame, real, imag);
213 213
214 constq->process(real, imag, cqre, cqim); 214 constq->process(real, imag, cqre, cqim);
215 215
216 for (int i = 0; i < ncoeff; ++i) { 216 for (int i = 0; i < ncoeff; ++i) {
217 cq[i] += sqrt(cqre[i] * cqre[i] + cqim[i] * cqim[i]); 217 cq[i] += sqrt(cqre[i] * cqre[i] + cqim[i] * cqim[i]);