diff --git a/include/avnd/binding/max/audio_processor.hpp b/include/avnd/binding/max/audio_processor.hpp index ee26424a..5ddc2563 100644 --- a/include/avnd/binding/max/audio_processor.hpp +++ b/include/avnd/binding/max/audio_processor.hpp @@ -143,7 +143,7 @@ struct audio_processor // but most pd externals seem to just do a chain of if() so this is equivalent float res = argv[0].a_w.w_float; avnd::pfr::for_each_field(state.inputs, [s, res, &state](C& ctl) { - if constexpr(requires { ctl.value = float{}; }) + if constexpr(avnd::float_parameter || avnd::int_parameter || avnd::bool_parameter) { constexpr std::string_view control_name = avnd::get_name(); if(control_name == s->s_name) @@ -161,7 +161,7 @@ struct audio_processor // but most pd externals seem to just do a chain of if() so this is equivalent int res = argv[0].a_w.w_long; avnd::pfr::for_each_field(state.inputs, [s, res, &state](C& ctl) { - if constexpr(avnd::int_parameter || avnd::float_parameter || avnd::enum_parameter) + if constexpr(avnd::int_parameter || avnd::float_parameter || avnd::enum_parameter || avnd::bool_parameter) { constexpr std::string_view control_name = avnd::get_name(); if(control_name == s->s_name) diff --git a/include/avnd/binding/pd/audio_processor.hpp b/include/avnd/binding/pd/audio_processor.hpp index 0cee002c..2c7ed1ff 100644 --- a/include/avnd/binding/pd/audio_processor.hpp +++ b/include/avnd/binding/pd/audio_processor.hpp @@ -171,7 +171,9 @@ struct audio_processor // but most pd externals seem to just do a chain of if() so this is equivalent float res = argv[0].a_w.w_float; avnd::for_each_field_ref(state.inputs, [s, res, &state](C& ctl) { - if constexpr(requires { ctl.value = float{}; }) + if constexpr( + avnd::float_parameter< + C> || avnd::int_parameter || avnd::bool_parameter) { constexpr std::string_view control_name = avnd::get_name(); if(control_name == s->s_name)