Main Page | Modules | Class Hierarchy | Class List | Directories | File List | Class Members | File Members | Related Pages

fft.h

00001 /*****************************************************************************
00002  * fft.h: Headers for iterative implementation of a FFT
00003  *****************************************************************************
00004  * $Id: fft.h 10101 2005-03-02 16:47:31Z robux4 $
00005  *
00006  * Mainly taken from XMMS's code
00007  * 
00008  * Authors: Richard Boulton <[email protected]>
00009  *
00010  * This program is free software; you can redistribute it and/or modify
00011  * it under the terms of the GNU General Public License as published by
00012  * the Free Software Foundation; either version 2 of the License, or
00013  * (at your option) any later version.
00014  * 
00015  * This program is distributed in the hope that it will be useful,
00016  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00017  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018  * GNU General Public License for more details.
00019  *
00020  * You should have received a copy of the GNU General Public License
00021  * along with this program; if not, write to the Free Software
00022  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111, USA.
00023  *****************************************************************************/
00024 
00025 #ifndef _FFT_H_
00026 #define _FFT_H_
00027 
00028 #define FFT_BUFFER_SIZE_LOG 9
00029 
00030 #define FFT_BUFFER_SIZE (1 << FFT_BUFFER_SIZE_LOG)
00031 
00032 /* sound sample - should be an signed 16 bit value */
00033 typedef short int sound_sample;
00034 
00035 struct _struct_fft_state {
00036      /* Temporary data stores to perform FFT in. */
00037      float real[FFT_BUFFER_SIZE];
00038      float imag[FFT_BUFFER_SIZE];
00039 };
00040 
00041 /* FFT prototypes */
00042 typedef struct _struct_fft_state fft_state;
00043 fft_state *visual_fft_init (void);
00044 void fft_perform (const sound_sample *input, float *output, fft_state *state);
00045 void fft_close (fft_state *state);
00046 
00047 
00048 #endif /* _FFT_H_ */

Generated on Tue Dec 20 10:14:59 2005 for vlc-0.8.4a by  doxygen 1.4.2