fft.h

Go to the documentation of this file.
00001 /*
00002      Copyright (C) 2003 Paul Brossier
00003 
00004      This program is free software; you can redistribute it and/or modify
00005      it under the terms of the GNU General Public License as published by
00006      the Free Software Foundation; either version 2 of the License, or
00007      (at your option) any later version.
00008 
00009      This program is distributed in the hope that it will be useful,
00010      but WITHOUT ANY WARRANTY; without even the implied warranty of
00011      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012      GNU General Public License for more details.
00013 
00014      You should have received a copy of the GNU General Public License
00015      along with this program; if not, write to the Free Software
00016      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
00017      
00018 */
00019 
00026 #ifndef FFT_H_
00027 #define FFT_H_
00028 
00029 /* note that <complex.h> is not included here but only in aubio_priv.h, so that
00030  * c++ projects can still use their own complex definition. */
00031 #include <fftw3.h>
00032 
00033 #ifdef HAVE_COMPLEX_H
00034 #if FFTW3F_SUPPORT
00035 #define FFTW_TYPE fftwf_complex
00036 #else
00037 #define FFTW_TYPE fftw_complex
00038 #endif
00039 #else
00040 #if FFTW3F_SUPPORT
00041 
00042 #define FFTW_TYPE float
00043 #else
00044 
00045 #define FFTW_TYPE double
00046 #endif
00047 #endif
00048 
00049 #ifdef __cplusplus
00050 extern "C" {
00051 #endif
00052 
00054 typedef FFTW_TYPE fft_data_t;
00055 
00064 typedef struct _aubio_fft_t aubio_fft_t;
00065 
00071 aubio_fft_t * new_aubio_fft(uint_t size);
00077 void del_aubio_fft(aubio_fft_t * s);
00086 void aubio_fft_do (const aubio_fft_t *s, const smpl_t * data,
00087     fft_data_t * spectrum, const uint_t size);
00096 void aubio_fft_rdo(const aubio_fft_t *s, const fft_data_t * spectrum,
00097     smpl_t * data, const uint_t size);
00105 void aubio_fft_getnorm(smpl_t * norm, fft_data_t * spectrum, uint_t size);
00113 void aubio_fft_getphas(smpl_t * phase, fft_data_t * spectrum, uint_t size);
00114 
00121 typedef struct _aubio_mfft_t aubio_mfft_t;
00122 
00129 aubio_mfft_t * new_aubio_mfft(uint_t winsize, uint_t channels);
00137 void aubio_mfft_do (aubio_mfft_t * fft,fvec_t * in,cvec_t * fftgrain);
00145 void aubio_mfft_rdo(aubio_mfft_t * fft,cvec_t * fftgrain, fvec_t * out);
00151 void del_aubio_mfft(aubio_mfft_t * fft);
00152 
00153 
00154 #ifdef __cplusplus
00155 }
00156 #endif
00157 
00158 #endif

Generated on Wed Oct 11 17:36:50 2006 for aubio by  doxygen 1.4.7