Mercurial > hg > qm-dsp
diff dsp/segmentation/ClusterMeltSegmenter.cpp @ 64:6cb2b3cd5356
* Refactor FFT a little bit so as to separate construction and processing
rather than have a single static method -- will make it easier to use a
different implementation
* pull in KissFFT implementation (not hooked up yet)
author | cannam |
---|---|
date | Wed, 13 May 2009 09:19:12 +0000 |
parents | d72fcd34d9a7 |
children | e5907ae6de17 |
line wrap: on
line diff
--- a/dsp/segmentation/ClusterMeltSegmenter.cpp Tue May 12 21:04:25 2009 +0000 +++ b/dsp/segmentation/ClusterMeltSegmenter.cpp Wed May 13 09:19:12 2009 +0000 @@ -22,6 +22,7 @@ ClusterMeltSegmenter::ClusterMeltSegmenter(ClusterMeltSegmenterParams params) : window(NULL), + fft(NULL), constq(NULL), mfcc(NULL), featureType(params.featureType), @@ -73,6 +74,8 @@ constq->sparsekernel(); ncoeff = constq->getK(); + + fft = new FFTReal(constq->getfftlength()); } else if (featureType == FEATURE_TYPE_MFCC) { @@ -107,6 +110,7 @@ delete window; delete constq; delete decimator; + delete fft; } int @@ -200,7 +204,7 @@ window->cut(frame); - FFT::process(fftsize, false, frame, 0, real, imag); + fft->process(false, frame, real, imag); constq->process(real, imag, cqre, cqim);