Mercurial > hg > vamp-plugin-sdk
view 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 |
line wrap: on
line source
// 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 #define VAMP_KISSFFT_USE_CPP_LINKAGE 1 namespace Kiss { #ifdef SINGLE_PRECISION_FFT #pragma message("Using single-precision FFTs") typedef float vamp_kiss_fft_scalar; #define vamp_kiss_fft_scalar float #else typedef double vamp_kiss_fft_scalar; #define vamp_kiss_fft_scalar double #endif #include "ext/vamp_kiss_fft.c" #include "ext/vamp_kiss_fftr.c" #undef vamp_kiss_fft_scalar // leaving only the namespaced typedef } // Check that this worked, i.e. that we have our own suitably // hacked KissFFT header which set this after making the // appropriate change #ifndef VAMP_KISSFFT_USED_CPP_LINKAGE #error "KissFFT header lacks specific linkage adjustment needed for Vamp SDK" #endif