Mercurial > hg > qm-dsp
changeset 254:52c1a295d775
...
author | Chris Cannam <c.cannam@qmul.ac.uk> |
---|---|
date | Wed, 16 Jan 2008 18:02:31 +0000 |
parents | 501b1c09734d |
children | 9edaa3ce62e8 |
files | dsp/mfcc/MFCC.cpp qm-dsp.pro |
diffstat | 2 files changed, 6 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/dsp/mfcc/MFCC.cpp Mon Jan 14 18:14:33 2008 +0000 +++ b/dsp/mfcc/MFCC.cpp Wed Jan 16 18:02:31 2008 +0000 @@ -124,11 +124,13 @@ * We calculate now mfccDCT matrix * NB: +1 because of the DC component */ + + const double pi = 3.14159265358979323846264338327950288; for (i=0; i<nceps+1; i++) { for (j=0; j<totalFilters; j++) { mfccDCTMatrix[i][j] = (1./sqrt((double) totalFilters / 2.)) - * cos((double) i * ((double) j + 0.5) / (double) totalFilters * M_PI); + * cos((double) i * ((double) j + 0.5) / (double) totalFilters * pi); } } @@ -205,7 +207,7 @@ /* Zero-pad if needed */ memcpy(inputData, inframe, length*sizeof(double)); - window->cut(inputData); +//!!! window->cut(inputData); /* Calculate the fft on the input frame */ FFT::process(fftSize, 0, inputData, imagIn, realOut, imagOut);