CLAM-Development
1.1
|
00001 /* 00002 * Copyright (c) 2001-2004 MUSIC TECHNOLOGY GROUP (MTG) 00003 * UNIVERSITAT POMPEU FABRA 00004 * 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program; if not, write to the Free Software 00018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00019 * 00020 */ 00021 00022 00023 #ifndef FFT_fftw3_hxx 00024 #define FFT_fftw3_hxx 00025 00026 #ifndef USE_FFTW3 00027 #error This header should not be used without the USE_FFTW3 macro defined 00028 #endif 00029 00030 #include "FFT_base.hxx" 00031 #include "DataTypes.hxx" 00032 #include "SpecTypeFlags.hxx" 00033 #include "ErrDynamicType.hxx" 00034 00035 namespace CLAM 00036 { 00037 00038 class FFTConfig; 00039 class Spectrum; 00040 class Audio; 00041 namespace Hidden { struct FFT_fftw3_Implementation; } 00042 00045 class FFT_fftw3: public FFT_base 00046 { 00047 public: 00048 FFT_fftw3(const FFTConfig &c=FFTConfig()); 00049 ~FFT_fftw3(); 00050 const char * GetClassName() const {return "FFT_fftw3";} 00051 00052 // Execution methods 00053 bool Do(); 00054 bool Do(const Audio& in, Spectrum &out); 00055 protected: 00056 bool ConcreteConfigure(const ProcessingConfig&); 00057 00058 private: 00059 Hidden::FFT_fftw3_Implementation * _fftw3; 00060 private: 00061 // Memory Management (for work areas and stuff) 00062 void ReleaseMemory(); 00063 void SetupMemory(); 00064 00065 // Output conversions 00066 void ToComplex(Spectrum &out); 00067 }; 00068 00069 }//namespace CLAM 00070 00071 #endif//FFT_fftw3_hxx 00072