diff --git a/examples/Advanced/Utilities/LightnessComputer.hpp b/examples/Advanced/Utilities/LightnessComputer.hpp index 57f07b51..3d9e981a 100644 --- a/examples/Advanced/Utilities/LightnessComputer.hpp +++ b/examples/Advanced/Utilities/LightnessComputer.hpp @@ -136,7 +136,7 @@ struct LightnessComputer using clk = std::chrono::steady_clock; clk::time_point last_ui_message = clk::now(); - void init() + void prepare() { inputs.image.request_width = inputs.size.value.x; inputs.image.request_height = inputs.size.value.y; diff --git a/include/avnd/binding/ossia/soundfiles.hpp b/include/avnd/binding/ossia/soundfiles.hpp index 3cbb4892..138130a7 100644 --- a/include/avnd/binding/ossia/soundfiles.hpp +++ b/include/avnd/binding/ossia/soundfiles.hpp @@ -347,11 +347,14 @@ struct raw_file_storage : raw_file_input_storage { avnd::raw_file_port auto& port = avnd::pfr::get(state.inputs); - port.file.bytes - = decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size()); - port.file.filename = hdl->filename; + if(port.file.filename != hdl->filename) + { + port.file.bytes + = decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size()); + port.file.filename = hdl->filename; - if_possible(port.update(state.effect)); + if_possible(port.update(state.effect)); + } } } @@ -368,10 +371,14 @@ struct raw_file_storage : raw_file_input_storage // FIXME not generic enough.. GPU should also use effect_container avnd::raw_file_port auto& port = avnd::pfr::get(state.inputs); - port.file.bytes = decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size()); - port.file.filename = hdl->filename; + if(port.file.filename != hdl->filename) + { + port.file.bytes + = decltype(port.file.bytes)(hdl->data.constData(), hdl->file.size()); + port.file.filename = hdl->filename; - if_possible(port.update(state)); + if_possible(port.update(state)); + } } }; } diff --git a/include/avnd/binding/vst3/metadata.hpp b/include/avnd/binding/vst3/metadata.hpp index e263fa64..53acd74e 100644 --- a/include/avnd/binding/vst3/metadata.hpp +++ b/include/avnd/binding/vst3/metadata.hpp @@ -3,6 +3,7 @@ /* SPDX-License-Identifier: GPL-3.0-or-later */ #include +#include #include #include @@ -121,8 +122,7 @@ static consteval UnionID controller_uuid_for_type() UnionID component_id = component_uuid_for_type(); // We just swap the values to get a new uuid... - static constexpr auto exch = [](char& a, char& b) consteval - { + static_constexpr auto exch = [](char& a, char& b) consteval { char tmp = a; a = b; b = tmp; diff --git a/include/avnd/wrappers/controls.hpp b/include/avnd/wrappers/controls.hpp index 097c6151..ae256bf8 100644 --- a/include/avnd/wrappers/controls.hpp +++ b/include/avnd/wrappers/controls.hpp @@ -115,6 +115,12 @@ static void apply_control(T& ctl, avnd::string_ish auto&& v) } } +template +static void apply_control(T& ctl, const char* v) +{ + return apply_control(ctl, std::string_view(v)); +} + /** * @brief Used for the case where the "host" works in a fixed [0. ; 1.] range */