electro-smith / DaisySP

A Powerful DSP Library in C++
https://www.electro-smith.com/daisy
Other
882 stars 139 forks source link

Fix cmake build on windows #197

Open Segfault1602 opened 9 months ago

Segfault1602 commented 9 months ago

CMake build was broken on windows due to M_E being undeclared. Fix is to define _USE_MATH_DEFINES on windows when building the library.

Alloyed commented 3 months ago

found this, and one other thing on my attempt to build msvc. in ladder.cpp

__attribute__((optimize("unroll-loops"))) void
void LadderFilter::ProcessBlock(float* buf, size_t size)
{
    for(size_t i = 0; i < size; i++)
    {
        buf[i] = Process(buf[i]);
    }
}

attribute is gcc-specific, causes msvc to not compile, and will be ignored on clang. alternatives: