electro-smith / DaisySP

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

std::sin usage in Looper #169

Closed antisvin closed 2 years ago

antisvin commented 2 years ago

I've ran into an issue with the latest library version due to std::sin being used to define a constant in Looper.h . The problem is that on OWL we replace sin/sinf with calls to arm_sin_f32 from CMSIS by overriding it with a macro. This won't work when it's used from std namespace and it can't be constexpr because of this optimization.

Would it be possible to either use the actual value of 0.7071067811865476 for looper or move it to dsp.h to allow overriding in third party code?

stephenhensley commented 2 years ago

Yup! Easy enough; thanks for the feedback!

antisvin commented 2 years ago

Thanks, this should do the trick.

stephenhensley commented 2 years ago

no problem!