diff options
Diffstat (limited to 'source/device_formula.cpp')
-rw-r--r-- | source/device_formula.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/source/device_formula.cpp b/source/device_formula.cpp index a70f465..e21d374 100644 --- a/source/device_formula.cpp +++ b/source/device_formula.cpp @@ -11,13 +11,26 @@ */ #include "stmdsp.hpp" -#include "exprtk.hpp" #include <algorithm> #include <random> #include <string_view> #include <vector> +#ifndef STMDSP_DISABLE_FORMULAS + +#define exprtk_disable_comments +#define exprtk_disable_break_continue +#define exprtk_disable_sc_andor +#define exprtk_disable_return_statement +#define exprtk_disable_enhanced_features +//#define exprtk_disable_string_capabilities +#define exprtk_disable_superscalar_unroll +#define exprtk_disable_rtl_io_file +#define exprtk_disable_rtl_vecops +//#define exprtk_disable_caseinsensitivity +#include "exprtk.hpp" + static std::random_device randomDevice; std::vector<stmdsp::dacsample_t> deviceGenLoadFormulaEval(const std::string& formulaString) @@ -62,3 +75,12 @@ std::vector<stmdsp::dacsample_t> deviceGenLoadFormulaEval(const std::string& for return samples; } +#else // no formula support + +std::vector<stmdsp::dacsample_t> deviceGenLoadFormulaEval(const std::string&) +{ + return {}; +} + +#endif // STMDSP_DISABLE_FORMULAS + |