annotate src/vamp-sdk/FFTimpl.cpp @ 501:90571dcc371a vamp-kiss-naming

Extensively rename things in the KissFFT headers to use a Vamp prefix. The motivation is not to change anything about the Vamp SDK library builds, but to avoid confusion in case any other code (for example that pulls in the Vamp SDK as part of a wider project definition) accidentally includes these headers instead of, or as well as, some other copy of KissFFT.
author Chris Cannam
date Tue, 30 Jan 2018 09:56:46 +0000
parents 25e023bad200
children
rev   line source
Chris@449 1
Chris@449 2 // Override C linkage for KissFFT headers. So long as we have already
Chris@449 3 // included all of the other (system etc) headers KissFFT depends on,
Chris@449 4 // this should work out OK
Chris@501 5 #define VAMP_KISSFFT_USE_CPP_LINKAGE 1
Chris@449 6
Chris@449 7 namespace Kiss {
Chris@449 8
Chris@449 9 #ifdef SINGLE_PRECISION_FFT
Chris@449 10 #pragma message("Using single-precision FFTs")
Chris@501 11 typedef float vamp_kiss_fft_scalar;
Chris@501 12 #define vamp_kiss_fft_scalar float
Chris@449 13 #else
Chris@501 14 typedef double vamp_kiss_fft_scalar;
Chris@501 15 #define vamp_kiss_fft_scalar double
Chris@449 16 #endif
Chris@449 17
Chris@501 18 #include "ext/vamp_kiss_fft.c"
Chris@501 19 #include "ext/vamp_kiss_fftr.c"
Chris@449 20
Chris@501 21 #undef vamp_kiss_fft_scalar // leaving only the namespaced typedef
Chris@449 22
Chris@449 23 }
Chris@449 24
Chris@493 25 // Check that this worked, i.e. that we have our own suitably
Chris@493 26 // hacked KissFFT header which set this after making the
Chris@493 27 // appropriate change
Chris@501 28 #ifndef VAMP_KISSFFT_USED_CPP_LINKAGE
Chris@493 29 #error "KissFFT header lacks specific linkage adjustment needed for Vamp SDK"
Chris@493 30 #endif