view dsp/transforms/FFT.h @ 27:b678e72323df

* Adjust MFCC params in segmenter to match timbral MFCC params from Soundbite
author cannam
date Thu, 10 Jan 2008 17:26:15 +0000
parents d7116e3183f8
children a251fb0de594
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */

/*
    QM DSP Library

    Centre for Digital Music, Queen Mary, University of London.
    This file is based on Don Cross's public domain FFT implementation.
*/

#ifndef FFT_H
#define FFT_H

class FFT  
{
public:
    static void process(unsigned int p_nSamples, bool p_bInverseTransform,
                        double *p_lpRealIn, double *p_lpImagIn,
                        double *p_lpRealOut, double *p_lpImagOut);
    FFT();
    virtual ~FFT();

protected:
    static unsigned int reverseBits(unsigned int p_nIndex, unsigned int p_nBits);
    static unsigned int numberOfBitsNeeded( unsigned int p_nSamples );
    static bool isPowerOfTwo( unsigned int p_nX );
};

#endif