IFFT_ooura.hxx

Go to the documentation of this file.
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 _IFFT_ooura_
00024 #define _IFFT_ooura_
00025 
00026 #include "IFFT_base.hxx"
00027 #include "DataTypes.hxx"
00028 #include "SpecTypeFlags.hxx"
00029 #include "ErrDynamicType.hxx"
00030 
00031 namespace CLAM {
00032 
00033         struct IFFTConfig;
00034         class Spectrum;
00035         class Audio;
00036         class ProcessingConfig;
00037 
00043         class IFFT_ooura: public IFFT_base
00044         {
00046                 int *ip;
00047                 TData *w;
00048                 
00050                 TData* ifftbuffer;
00052                 SpecTypeFlags mComplexflags;
00053 
00054                 /* IFFT possible execution states.
00055                 */
00056                 typedef enum {
00057                         sComplex, // We just need to read the complex array.
00058                         sOther // The complex array is not present.
00059                 } IFFTState;
00060 
00063                 IFFTState mState;
00064         
00065                 bool IFFTConfigure();
00066 
00069                 bool ConcreteConfigure(const ProcessingConfig&);
00070 
00071                 // Memory Management (for work areas and stuff)
00072 
00073                 void ReleaseMemory();
00074 
00075                 void SetupMemory();
00076 
00077                 // Output conversions
00078 
00079                 void ComplexToIFFTOoura(const Spectrum &in) const;
00080                 void OtherToIFFTOoura(const Spectrum &in) const;
00081 
00082                 inline void CheckTypes(const Spectrum& in, const Audio &out) const;
00083 
00084         public:
00085 
00086                 IFFT_ooura();
00087 
00088                 IFFT_ooura(const IFFTConfig &c) throw(ErrDynamicType);
00089 
00090                 ~IFFT_ooura();
00091 
00092                 const char * GetClassName() const {return "IFFT_ooura";}
00093 
00094                 // Execution methods
00095 
00096                 bool Do();
00097 
00098                 bool Do(const Spectrum& in, Audio &out) const;
00099 
00100                 // Port interfaces.
00101 
00102                 bool SetPrototypes(const Spectrum& in,const Audio &out);
00103 
00104                 bool SetPrototypes();
00105 
00106                 bool UnsetPrototypes();
00107                 
00108                 bool MayDisableExecution() const {return true;}
00109 
00110         };
00111 
00112 };//namespace CLAM
00113 
00114 #endif // _IFFT_numrec_
00115 
Generated by  doxygen 1.6.3