Mercurial > hg > vamp-plugin-sdk
comparison 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 |
comparison
equal
deleted
inserted
replaced
444:7bab0c5422f4 | 445:7f7a10bcaff1 |
---|---|
47 #include <stdio.h> | 47 #include <stdio.h> |
48 #include <math.h> | 48 #include <math.h> |
49 #include <string.h> | 49 #include <string.h> |
50 #include <limits.h> | 50 #include <limits.h> |
51 | 51 |
52 // Define this symbol in the build if you want to use single-precision | |
53 // FFTs in the input domain adapter. The default is to use | |
54 // double-precision FFTs. | |
55 // | |
56 //#define SINGLE_PRECISION_INPUT_DOMAIN_ADAPTER 1 | |
57 | |
58 // Override C linkage for KissFFT headers. So long as we have already | |
59 // included all of the other (system etc) headers KissFFT depends on, | |
60 // this should work out OK | |
61 #undef __cplusplus | |
62 | |
63 namespace Kiss { | |
64 | |
65 #undef KISS_FFT_H | |
66 #undef KISS_FTR_H | |
67 #undef KISS_FFT__GUTS_H | |
68 #undef FIXED_POINT | |
69 #undef USE_SIMD | |
70 #undef kiss_fft_scalar | |
71 | |
72 #ifdef SINGLE_PRECISION_INPUT_DOMAIN_ADAPTER | |
73 typedef float kiss_fft_scalar; | |
74 #define kiss_fft_scalar float | |
75 #else | |
76 typedef double kiss_fft_scalar; | |
77 #define kiss_fft_scalar double | |
78 #endif | |
79 | |
80 inline void free(void *ptr) { ::free(ptr); } | |
81 #include "../vamp-sdk/ext/kiss_fft.c" | |
82 #include "../vamp-sdk/ext/kiss_fftr.c" | |
83 | |
84 #undef kiss_fft_scalar // leaving only the namespaced typedef | |
85 | |
86 } | |
87 | |
88 _VAMP_SDK_HOSTSPACE_BEGIN(PluginInputDomainAdapter.cpp) | 52 _VAMP_SDK_HOSTSPACE_BEGIN(PluginInputDomainAdapter.cpp) |
53 | |
54 #include "../vamp-sdk/FFTimpl.cpp" | |
89 | 55 |
90 namespace Vamp { | 56 namespace Vamp { |
91 | 57 |
92 namespace HostExt { | 58 namespace HostExt { |
93 | 59 |