Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix crash in release build on certain runtime combinations #4

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
7 changes: 0 additions & 7 deletions vamp-plugin/LteVampBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
#include <thread>
#include <vamp-sdk/PluginAdapter.h>

#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
{
Expand All @@ -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
Expand Down