From e2de64d6f1beb9e492daf5b886e19933c1fa41dd Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- noatun/modules/winskin/vis/realFFT.h | 69 ++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 noatun/modules/winskin/vis/realFFT.h (limited to 'noatun/modules/winskin/vis/realFFT.h') diff --git a/noatun/modules/winskin/vis/realFFT.h b/noatun/modules/winskin/vis/realFFT.h new file mode 100644 index 00000000..39c6dbfd --- /dev/null +++ b/noatun/modules/winskin/vis/realFFT.h @@ -0,0 +1,69 @@ +/* + a FFT class + Copyright (C) 1998 Martin Vogt;Philip VanBaren + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation. + + For more information look at the file COPYRIGHT in this package + + */ + + + + +#ifndef __REALFFT_H +#define __REALFFT_H + +#include +#include +#include + +/** +
+ *     Program: REALFFTF.C
+ *      Author: Philip VanBaren
+ *        Date: 2 September 1993
+ *
+ * Description: These routines perform an FFT on real data.
+ *              On a 486/33 compiled using Borland C++ 3.1 with full
+ *              speed optimization and a small memory model, a 1024 point 
+ *              FFT takes about 16ms.
+ *              This code is for floating point data.
+ *
+ *  Note: Output is BIT-REVERSED! so you must use the BitReversed to
+ *        get legible output, (i.e. Real_i = buffer[ BitReversed[i] ]
+ *                                  Imag_i = buffer[ BitReversed[i]+1 ] )
+ *        Input is in normal order.
+ 
+ */ + + + +class RealFFT { + + int* BitReversed; + short* SinTable; + int Points; + + public: + RealFFT(int fftlen); + ~RealFFT(); + + void fft(short* buffer); + int* getBitReversed(); + + private: + + short *A,*B; + short *sptr; + short *endptr1,*endptr2; + int *br1,*br2; + long HRplus,HRminus,HIplus,HIminus; + + +}; + + +#endif -- cgit v1.2.1