VST3: fix manually setting parameter (amend 52a73fdb3
)
This commit is contained in:
parent
52a73fdb33
commit
5e967c02a9
|
@ -164,7 +164,7 @@ public:
|
||||||
|
|
||||||
/* API for Ardour -- Parameters */
|
/* API for Ardour -- Parameters */
|
||||||
bool try_set_parameter_by_id (Vst::ParamID id, float value);
|
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;
|
float get_parameter (uint32_t p) const;
|
||||||
std::string format_parameter (uint32_t p) const;
|
std::string format_parameter (uint32_t p) const;
|
||||||
Vst::ParamID index_to_id (uint32_t) const;
|
Vst::ParamID index_to_id (uint32_t) const;
|
||||||
|
|
|
@ -799,7 +799,7 @@ VST3Plugin::connect_and_run (BufferSet& bufs,
|
||||||
/* apply parameter changes */
|
/* apply parameter changes */
|
||||||
PV pv;
|
PV pv;
|
||||||
while (_parameter_queue.read (&pv, 1)) {
|
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;
|
in_index = 0;
|
||||||
|
@ -1949,11 +1949,11 @@ VST3PI::try_set_parameter_by_id (Vst::ParamID id, float value)
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
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);
|
Vst::ParamID id = index_to_id (p);
|
||||||
value = _controller->plainParamToNormalized (id, value);
|
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;
|
return;
|
||||||
}
|
}
|
||||||
if (to_list) {
|
if (to_list) {
|
||||||
|
|
Loading…
Reference in New Issue