VST3: fix manually setting parameter (amend 52a73fdb3)

This commit is contained in:
Robin Gareus 2023-04-26 00:19:36 +02:00
parent 52a73fdb33
commit 5e967c02a9
Signed by: rgareus
GPG Key ID: A090BCE02CF57F04
2 changed files with 4 additions and 4 deletions

View File

@ -164,7 +164,7 @@ public:
/* API for Ardour -- Parameters */
bool try_set_parameter_by_id (Vst::ParamID id, float value);
void set_parameter (uint32_t p, float value, int32 sample_off, bool to_list = true);
void set_parameter (uint32_t p, float value, int32 sample_off, bool to_list = true, bool force = false);
float get_parameter (uint32_t p) const;
std::string format_parameter (uint32_t p) const;
Vst::ParamID index_to_id (uint32_t) const;

View File

@ -799,7 +799,7 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
/* apply parameter changes */
PV pv;
while (_parameter_queue.read (&pv, 1)) {
_plug->set_parameter (pv.port, pv.val, 0, true);
_plug->set_parameter (pv.port, pv.val, 0, true, true);
}
in_index = 0;
@ -1949,11 +1949,11 @@ VST3PI::try_set_parameter_by_id (Vst::ParamID id, float value)
}
void
VST3PI::set_parameter (uint32_t p, float value, int32 sample_off, bool to_list)
VST3PI::set_parameter (uint32_t p, float value, int32 sample_off, bool to_list, bool force)
{
Vst::ParamID id = index_to_id (p);
value = _controller->plainParamToNormalized (id, value);
if (_shadow_data[p] == value && sample_off == 0 && to_list) {
if (_shadow_data[p] == value && sample_off == 0 && to_list && !force) {
return;
}
if (to_list) {