VST3: never hand a wrapper-owned parameter id to the plugin - #562
Merged
Merged
Conversation
isWrapperOwned() covers the MIDI parameters and the preset selector, and every walk of the parameter container now tests it.
defiantnerd
force-pushed
the
fix-554-wrapper-owned-params
branch
from
September 15, 2026 04:30
35f8e35 to
6b90133
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #554.
The preset selector is not a CLAP parameter — it has an invented
ParamIDand leavesparam_index_for_clap_get_infoat 0. VST3-2 (b4835df) fixed one loop that skipped onlyisMidi; two more did the same:syncParameterValuesFromClap()— calledget_valuewith the selector's idgetParamValueByString()— calledtext_to_valuewith itRather than patch the two, this adds
Vst3Parameter::isWrapperOwned()(isMidi || isPreset) and routes every walk of the parameter container through it, including the two that were already correct. A grep forisMidiinwrapasvst3.cppnow returns nothing, so the next wrapper-owned parameter kind cannot quietly reintroduce this.No behavioural change for a correct plugin: the invented id was previously rejected by
get_value/text_to_valuerather than acted on. What changes is that the wrapper no longer depends on every plugin being defensive about unknown ids.One place the predicate deliberately does not apply.
detail/vst3/process.cpp:297,314dispatches onisPresetandisMidiseparately, in that order, and that split is load-bearing — the preset selector must not be turned into a 0xC0 message. A future wrapper-owned kind still needs its own branch there.Build-gated on
clap-first-distortion_vst3, clean.