From b6a8057cdebc4c7aa61fa42f736268c6ec3fc540 Mon Sep 17 00:00:00 2001 From: kryksyh Date: Sun, 10 Nov 2024 12:23:57 +0300 Subject: [PATCH] Fix crash in release build on certain runtime combinations --- CMakeLists.txt | 3 +++ vamp-plugin/LteVampBase.cpp | 7 ------- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f69745a..db50215 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,6 +9,9 @@ option(BUILD_VAMP_PLUGIN "Build Vamp plugin" ON) set(CMAKE_CXX_STANDARD 17) if (MSVC) + # Fix crash on older runtimes: https://github.com/microsoft/STL/wiki/Changelog#vs-2022-1710 + add_definitions(-D_DISABLE_CONSTEXPR_MUTEX_CONSTRUCTOR) + # Suppress specific MSVC warnings add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_compile_options( diff --git a/vamp-plugin/LteVampBase.cpp b/vamp-plugin/LteVampBase.cpp index dac3cc2..7d97320 100644 --- a/vamp-plugin/LteVampBase.cpp +++ b/vamp-plugin/LteVampBase.cpp @@ -4,9 +4,6 @@ #include #include -#ifdef NDEBUG -#error For some obscure reason, the DLL doesn't get loaded by sonic visualiser when built in Release mode. If you can fix this then please remove this error. -#endif namespace { @@ -29,10 +26,6 @@ LteVampBase::LteVampBase(float inputSampleRate) , mSampleCount(LTE::FileUtils::ReadFromAppDataFile()) , mAudioReader(inputSampleRate) { - // This was an unsuccessfuly attempt to make the plugin work in Sonic - // Visualiser also in Release mode. Doesn't work, but let's leave it here to - // show that the experiment has already been done. - (void*)&vampGetPluginDescriptor; } std::string LteVampBase::getIdentifier() const