diff --git a/src/plugins/score-plugin-avnd/Crousti/Concepts.hpp b/src/plugins/score-plugin-avnd/Crousti/Concepts.hpp index 8b42b3dda2..42666b7b98 100644 --- a/src/plugins/score-plugin-avnd/Crousti/Concepts.hpp +++ b/src/plugins/score-plugin-avnd/Crousti/Concepts.hpp @@ -66,13 +66,6 @@ struct CustomFloatControlBase : public Process::ControlInlet auto getMin() const noexcept { return domain().get().template convert_min(); } auto getMax() const noexcept { return domain().get().template convert_max(); } - - void setupExecution(ossia::inlet& inl) const noexcept override - { - auto& port = **safe_cast(&inl); - port.type = ossia::val_type::FLOAT; - port.domain = domain().get(); - } }; template @@ -92,6 +85,22 @@ struct CustomFloatControl : public CustomFloatControlBase } ~CustomFloatControl() = default; + + void setupExecution(ossia::inlet& inl) const noexcept override + { + auto& port = **safe_cast(&inl); + port.type = ossia::val_type::FLOAT; + using inlet_type = avnd::input_introspection; + using port_type = inlet_type::template field_type; + if constexpr(avnd::has_range) + { + static constexpr auto range = avnd::get_range(); + ossia::domain_base dom; + dom.min = range.min; + dom.max = range.max; + port.domain = dom; + } + } }; }