jamie@149: /* jamie@149: * Copyright (C) 2012 Jamie Bullock jamie@149: * jamie@149: * Permission is hereby granted, free of charge, to any person obtaining a copy jamie@149: * of this software and associated documentation files (the "Software"), to jamie@149: * deal in the Software without restriction, including without limitation the jamie@149: * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or jamie@149: * sell copies of the Software, and to permit persons to whom the Software is jamie@149: * furnished to do so, subject to the following conditions: jamie@149: * jamie@149: * The above copyright notice and this permission notice shall be included in jamie@149: * all copies or substantial portions of the Software. jamie@149: * jamie@149: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR jamie@149: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, jamie@149: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE jamie@149: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER jamie@149: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING jamie@149: * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS jamie@149: * IN THE SOFTWARE. jamie@149: * jamie@149: */ jamie@149: jamie@150: #ifndef FFT_H jamie@150: #define FFT_H jamie@150: andrea@211: #ifdef _MSC_VER andrea@211: #ifndef __cplusplus andrea@211: typedef int bool; andrea@211: #define false 0 andrea@211: #define true 1 andrea@211: #endif andrea@211: #else andrea@211: #include andrea@211: #endif jamie@154: jamie@150: #ifdef USE_OOURA jamie@149: #include "ooura/fftsg.h" jamie@150: #else jamie@276: #ifndef __APPLE__ jamie@276: #error "The target platform is not an Apple one and USE_OOURA was not defined" jamie@276: #endif jamie@150: #include jamie@150: #endif jamie@150: jamie@150: #ifdef USE_OOURA jamie@150: typedef struct xtract_ooura_data_ jamie@150: { jamie@150: int *ooura_ip; jamie@150: double *ooura_w; jamie@150: bool initialised; jamie@150: } xtract_ooura_data; jamie@150: #else jamie@150: typedef struct xtract_vdsp_data_ jamie@150: { jamie@150: FFTSetupD setup; jamie@150: DSPDoubleSplitComplex fft; jamie@150: vDSP_Length log2N; jamie@150: bool initialised; jamie@150: } xtract_vdsp_data; jamie@150: #endif jamie@150: jamie@150: #endif /* Header guard */