comparison dsp/chromagram/ConstantQ.cpp @ 32:8bb764969d50

* Add windowing to Chromagram input * Add window option to MFCC config
author cannam
date Fri, 18 Jan 2008 17:57:40 +0000
parents 2b74bd60c61f
children 3dff6e3e2121
comparison
equal deleted inserted replaced
31:dfe38135e4c7 32:8bb764969d50
127 delete [] transfHammingWindowIm; 127 delete [] transfHammingWindowIm;
128 128
129 } 129 }
130 130
131 //----------------------------------------------------------------------------- 131 //-----------------------------------------------------------------------------
132 double* ConstantQ::process( double* fftdata ) 132 double* ConstantQ::process( const double* fftdata )
133 { 133 {
134 for (unsigned row=0; row<2*m_uK; row++) 134 for (unsigned row=0; row<2*m_uK; row++)
135 { 135 {
136 m_CQdata[ row ] = 0; 136 m_CQdata[ row ] = 0;
137 m_CQdata[ row+1 ] = 0; 137 m_CQdata[ row+1 ] = 0;
186 void ConstantQ::deInitialise() 186 void ConstantQ::deInitialise()
187 { 187 {
188 delete [] m_CQdata; 188 delete [] m_CQdata;
189 } 189 }
190 190
191 void ConstantQ::process(double *FFTRe, double* FFTIm, double *CQRe, double *CQIm) 191 void ConstantQ::process(const double *FFTRe, const double* FFTIm,
192 double *CQRe, double *CQIm)
192 { 193 {
193 for (unsigned row=0; row<m_uK; row++) 194 for (unsigned row=0; row<m_uK; row++)
194 { 195 {
195 CQRe[ row ] = 0; 196 CQRe[ row ] = 0;
196 CQIm[ row ] = 0; 197 CQIm[ row ] = 0;