From 3b2c0bb60e26a3d5139d5eb5c105c5d6e990da35 Mon Sep 17 00:00:00 2001 From: defiantnerd <97224712+defiantnerd@users.noreply.github.com> Date: Sun, 10 Mar 2024 20:20:29 +0100 Subject: [PATCH] clearing parameters should clear the parameter in the vst3 param tree, too --- src/wrapasvst3.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/wrapasvst3.cpp b/src/wrapasvst3.cpp index ee37012f..ac0cb38f 100644 --- a/src/wrapasvst3.cpp +++ b/src/wrapasvst3.cpp @@ -798,6 +798,13 @@ void ClapAsVst3::param_rescan(clap_param_rescan_flags flags) void ClapAsVst3::param_clear(clap_id param, clap_param_clear_flags flags) { + auto vst3id = param & 0x7FFFFFFF; + // auto* p = (Vst3Parameter*)(parameters.getParameter(param & 0x7FFFFFFF)); + if (flags & CLAP_PARAM_CLEAR_ALL) + { + this->parameters.removeParameter(vst3id); + } + // all other flags can not be really mapped to VST3 functions } // request_flush requests a defered call to flush if there is no processing