It would be great to have a platform-independent way for assertions (e.g. bkpt 255 on ARM, assert(), etc.).
- Create
Source/platform.h
- Add macro
D_SP_ASSERTFALSE that triggers an assertion. The JUCE macro jassertfalse could serve as a template and could be extended for bkpt 255 when compiling for embedded targets.
- Add macro
D_SP_ASSERT(bool condition) that triggers D_SP_ASSERTFALSE if !condition
- Replace all existing assertions with these macros
The same file could also be very useful in libDaisy.
It would be great to have a platform-independent way for assertions (e.g.
bkpt 255on ARM,assert(), etc.).Source/platform.hD_SP_ASSERTFALSEthat triggers an assertion. The JUCE macrojassertfalsecould serve as a template and could be extended forbkpt 255when compiling for embedded targets.D_SP_ASSERT(bool condition)that triggersD_SP_ASSERTFALSEif!conditionThe same file could also be very useful in libDaisy.