electro-smith / DaisySP

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

Fixed missing __arm__ check before ARM assembly opcode #157

Closed dylan-robins closed 3 years ago

dylan-robins commented 3 years ago

I was having some issues compiling DaisySP on Windows 10 with MSVC to use in conjunction with JUCE, and found that an ARM-specific opcode was being inserted into the dsp.h header file regardless of the platform. Simply checking if the __arm__ define is set fixes the issue.

TheSlowGrowth commented 3 years ago

It would be cool to have a DAISYSP_ASSERT macro that, depending on the platform, is set to bkpt 255 or jassertfalse (when JUCE_DEBUG is defined).

stephenhensley commented 3 years ago

@TheSlowGrowth I like that idea a lot. Would be nice to have some platform independent macros for this type of stuff.

TheSlowGrowth commented 3 years ago

I opened #158 to add the macros, I think this PR is good-as-is and should be merged quickly to restore builds on non-embedded targets.

dylan-robins commented 3 years ago

Made a newbie mistake in my previous commit, I only tested my modification compiling for Windows and didn't try compiling for my board. Should be all good now. I've started to prototype some suggestions for #158 but I'm a little out of my depth, I'll keep you posted if I get something to work

stephenhensley commented 3 years ago

Good catch! and Thanks for the PR! Approved.