Esperando en línea al maestro de programación @-@
/* 43?ventana?=?1?-gt;?hanning?ventana 44?*/ 45?bool?InitFft(FFT_HANDLE?*hfft,?int?count,?int?window) 46?{ 47?int ?i ; 48? 49?hfft-gt; cuenta?=?cuenta; 50?hfft-gt; ganar?=?nuevo?float[count]; 53?return?false; 54?} 55?hfft-gt;wt?=?new?COMPLEX[count]; 56?if(hfft-gt;wt?==?NULL) 57?{ 58?delete[]? hfft-gt; ganar; 59?return?false; 60?} 61?for(i?=?0;?i?lt;?count;?i) 62?{ 63?hfft-gt;win[i]? =?float(0.50?-?0.50?*?cos(2?*?M_PI?*?i?/? (count?-?1)); 64?} 65?for(i?=?0;?i ?lt;?count;?i ) 66?{ 67?float?-i?*?M_PI?*?2?/?count; 68?hfft-gt;wt[i].re?=?cos(ángulo) ; 69?hfft-gt; wt[i].im?=?sin(ángulo); 70?} 71?72?return?true; 74?void?FFT(FFT_HANDLE?*hfft,?COMPLEX ?*TD2FD) 76?{ 77?int?i, j, k, mariposa, p; 78?79?int?power? =?NumberOfBits(hfft-gt; count); 82?for(k?=?0;?k?lt;?potencia;?k) 83?{ 84?for(j?=?0;?j?lt;?1lt;lt;k;?j) 85 ?{ 86?mariposa?=?1lt;lt;(power-k); 87?for(i?=?0;?i?lt;?mariposa/2;?i ) 88?{ 89?p=j? *?mariposa; 90?COMPLEJO?t?=?TD2FD[i?p?(TD2FD[i?? p]?-?TD2FD[i??p? ?Mariposa/2])?*?hfft-gt;wt[i*(1lt;lt;k)]; t; 93?} 94?} 95?} 96? 97?/*Reordenar*/ 98?for(i?=?1,j?=?hfft-gt;count/2;i?lt;=?hfft- gt;count-2;?i) 99?{
100?if(i?lt;?j)
101?{
102?COMPLEJO ?t?=?TD2FD[j];
103?TD2FD[j]? =?TD2FD[i];
104?TD2FD[i]?=?t;
105?}
106?k?=?hfft-gt;
;
107?mientras(k?lt;=?j)
108?{
109?j?=?j?k;
110?k?=?k?/?2;<
111?}
112?j?=?j?k;
113?}
114?}
115?