Mercurial > hg > vamp-plugin-sdk
diff src/vamp-hostsdk/PluginInputDomainAdapter.cpp @ 445:7f7a10bcaff1 vampipe
Single or double-precision FFTs (double in the default build), not both
author | Chris Cannam |
---|---|
date | Thu, 18 Aug 2016 15:06:23 +0100 |
parents | 7bab0c5422f4 |
children | af4a1522ef15 |
line wrap: on
line diff
--- a/src/vamp-hostsdk/PluginInputDomainAdapter.cpp Thu Aug 18 14:43:52 2016 +0100 +++ b/src/vamp-hostsdk/PluginInputDomainAdapter.cpp Thu Aug 18 15:06:23 2016 +0100 @@ -49,43 +49,9 @@ #include <string.h> #include <limits.h> -// Define this symbol in the build if you want to use single-precision -// FFTs in the input domain adapter. The default is to use -// double-precision FFTs. -// -//#define SINGLE_PRECISION_INPUT_DOMAIN_ADAPTER 1 +_VAMP_SDK_HOSTSPACE_BEGIN(PluginInputDomainAdapter.cpp) -// Override C linkage for KissFFT headers. So long as we have already -// included all of the other (system etc) headers KissFFT depends on, -// this should work out OK -#undef __cplusplus - -namespace Kiss { - -#undef KISS_FFT_H -#undef KISS_FTR_H -#undef KISS_FFT__GUTS_H -#undef FIXED_POINT -#undef USE_SIMD -#undef kiss_fft_scalar - -#ifdef SINGLE_PRECISION_INPUT_DOMAIN_ADAPTER -typedef float kiss_fft_scalar; -#define kiss_fft_scalar float -#else -typedef double kiss_fft_scalar; -#define kiss_fft_scalar double -#endif - -inline void free(void *ptr) { ::free(ptr); } -#include "../vamp-sdk/ext/kiss_fft.c" -#include "../vamp-sdk/ext/kiss_fftr.c" - -#undef kiss_fft_scalar // leaving only the namespaced typedef - -} - -_VAMP_SDK_HOSTSPACE_BEGIN(PluginInputDomainAdapter.cpp) +#include "../vamp-sdk/FFTimpl.cpp" namespace Vamp {