diff --git a/libs/vamp-plugins/Onset.cpp b/libs/vamp-plugins/Onset.cpp index d475b11be9..4a58bf9fa5 100644 --- a/libs/vamp-plugins/Onset.cpp +++ b/libs/vamp-plugins/Onset.cpp @@ -14,6 +14,9 @@ */ +#ifdef COMPILER_MSVC +#include +#endif #include #include "Onset.h" diff --git a/libs/vamp-plugins/OnsetDetect.cpp b/libs/vamp-plugins/OnsetDetect.cpp index 614eb4c943..714eee3647 100644 --- a/libs/vamp-plugins/OnsetDetect.cpp +++ b/libs/vamp-plugins/OnsetDetect.cpp @@ -12,6 +12,9 @@ COPYING included with this distribution for more information. */ +#ifdef COMPILER_MSVC +#include +#endif #include "OnsetDetect.h" #include "dsp/onsets/DetectionFunction.h" diff --git a/libs/vamp-plugins/PercussionOnsetDetector.cpp b/libs/vamp-plugins/PercussionOnsetDetector.cpp index 447eb19a28..623b89b6a0 100644 --- a/libs/vamp-plugins/PercussionOnsetDetector.cpp +++ b/libs/vamp-plugins/PercussionOnsetDetector.cpp @@ -34,6 +34,9 @@ authorization. */ +#ifdef COMPILER_MSVC +#include +#endif #include "PercussionOnsetDetector.h" using std::string; diff --git a/libs/vamp-plugins/SpectralCentroid.cpp b/libs/vamp-plugins/SpectralCentroid.cpp index 82d80b8100..f1493bf282 100644 --- a/libs/vamp-plugins/SpectralCentroid.cpp +++ b/libs/vamp-plugins/SpectralCentroid.cpp @@ -34,6 +34,19 @@ authorization. */ +#include + +#ifdef COMPILER_MSVC +#include + +// 'std::isinf()' and 'std::isnan()' are not available in MSVC. +#define isinf(val) !((bool)_finite((double)val)) +#define isnan(val) (bool)_isnan((double)val) +#else +using std::isnan; +using std:isinf; +#endif + #include "SpectralCentroid.h" using std::string; @@ -41,8 +54,6 @@ using std::vector; using std::cerr; using std::endl; -#include - SpectralCentroid::SpectralCentroid(float inputSampleRate) : Plugin(inputSampleRate), @@ -165,13 +176,13 @@ SpectralCentroid::process(const float *const *inputBuffers, Vamp::RealTime) Feature feature; feature.hasTimestamp = false; - if (!std::isnan(centroidLog) && !std::isinf(centroidLog)) { + if (!isnan(centroidLog) && !isinf(centroidLog)) { feature.values.push_back(centroidLog); } returnFeatures[0].push_back(feature); feature.values.clear(); - if (!std::isnan(centroidLin) && !std::isinf(centroidLin)) { + if (!isnan(centroidLin) && !isinf(centroidLin)) { feature.values.push_back(centroidLin); } returnFeatures[1].push_back(feature); diff --git a/msvc_extra_headers/ardourext/sys/targetsxs.h.input b/msvc_extra_headers/ardourext/sys/targetsxs.h.input index 6653041d8a..2730c8cb8d 100644 --- a/msvc_extra_headers/ardourext/sys/targetsxs.h.input +++ b/msvc_extra_headers/ardourext/sys/targetsxs.h.input @@ -57,8 +57,8 @@ __declspec(selectany) int _forceAtlDllManifestRTM; implementation for commonly used integer types. */ #include -#if (BUILDING_ARDOUR) #if defined(_MSC_VER) && !defined(__MINGW__) && !defined(__MINGW32__) +#if (INCLUDE_ARDOUR_MISCELLANEOUS) #include #endif #endif