From 1937c655f18ed1d09c3d676a6210f20ece2f3b14 Mon Sep 17 00:00:00 2001 From: jjYBdx4IL Date: Sun, 20 Feb 2022 02:34:09 +0100 Subject: [PATCH 1/2] enable math constants when compiling with MSVC --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index c2f5bbf..fa71158 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,7 @@ target_include_directories(string-machine if(MSVC) target_compile_options(string-machine PUBLIC "/fp:fast") + target_compile_definitions(string-machine PRIVATE _USE_MATH_DEFINES) else() target_compile_options(string-machine PUBLIC "-ffast-math") endif() From 0bb2ac9092d31402c8ecfd5f681a3a4f2d575024 Mon Sep 17 00:00:00 2001 From: jjYBdx4IL Date: Sun, 20 Feb 2022 02:34:52 +0100 Subject: [PATCH 2/2] fix Compiler Error C2466 in MSVC (fixed arreys of length 0 not allowed) --- gen/dsp/LFO3PhaseDual.cpp | 2 +- gen/dsp/NoiseLFO.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gen/dsp/LFO3PhaseDual.cpp b/gen/dsp/LFO3PhaseDual.cpp index 9f09eee..2529c2d 100644 --- a/gen/dsp/LFO3PhaseDual.cpp +++ b/gen/dsp/LFO3PhaseDual.cpp @@ -455,7 +455,7 @@ void LFO3PhaseDual::process( LFO3PhaseDualDsp &dsp = static_cast(*fDsp); float *inputs[] = { - + 0 }; float *outputs[] = { out0,out1,out2, diff --git a/gen/dsp/NoiseLFO.cpp b/gen/dsp/NoiseLFO.cpp index 7420708..8da692d 100644 --- a/gen/dsp/NoiseLFO.cpp +++ b/gen/dsp/NoiseLFO.cpp @@ -362,7 +362,7 @@ void NoiseLFO::process( NoiseLFODsp &dsp = static_cast(*fDsp); float *inputs[] = { - + 0 }; float *outputs[] = { out0,