remove min/max unbound -- LADSPA special case.
This explicit case should never have existed in the first place. Plugins can always implicitly exceed the range and are expected to cope with out-of-range values (e.g. meters when fed with a peaking signal may return an out-of-bounds value)
This commit is contained in:
parent
555fcb89e5
commit
cb48bb0e1c
@ -70,8 +70,6 @@ struct LIBARDOUR_API ParameterDescriptor : public Evoral::ParameterDescriptor
|
|||||||
float largestep;
|
float largestep;
|
||||||
bool integer_step;
|
bool integer_step;
|
||||||
bool sr_dependent;
|
bool sr_dependent;
|
||||||
bool min_unbound;
|
|
||||||
bool max_unbound;
|
|
||||||
bool enumeration;
|
bool enumeration;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -806,8 +806,6 @@ AUPlugin::discover_parameters ()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
d.min_unbound = 0; // lower is bound
|
|
||||||
d.max_unbound = 0; // upper is bound
|
|
||||||
d.update_steps();
|
d.update_steps();
|
||||||
|
|
||||||
descriptors.push_back (d);
|
descriptors.push_back (d);
|
||||||
|
@ -469,20 +469,17 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
|
|||||||
|
|
||||||
|
|
||||||
if (LADSPA_IS_HINT_BOUNDED_BELOW(prh.HintDescriptor)) {
|
if (LADSPA_IS_HINT_BOUNDED_BELOW(prh.HintDescriptor)) {
|
||||||
desc.min_unbound = false;
|
|
||||||
if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) {
|
if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) {
|
||||||
desc.lower = prh.LowerBound * _session.frame_rate();
|
desc.lower = prh.LowerBound * _session.frame_rate();
|
||||||
} else {
|
} else {
|
||||||
desc.lower = prh.LowerBound;
|
desc.lower = prh.LowerBound;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
desc.min_unbound = true;
|
|
||||||
desc.lower = 0;
|
desc.lower = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if (LADSPA_IS_HINT_BOUNDED_ABOVE(prh.HintDescriptor)) {
|
if (LADSPA_IS_HINT_BOUNDED_ABOVE(prh.HintDescriptor)) {
|
||||||
desc.max_unbound = false;
|
|
||||||
if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) {
|
if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) {
|
||||||
desc.upper = prh.UpperBound * _session.frame_rate();
|
desc.upper = prh.UpperBound * _session.frame_rate();
|
||||||
} else {
|
} else {
|
||||||
@ -490,10 +487,8 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (LADSPA_IS_HINT_TOGGLED (prh.HintDescriptor)) {
|
if (LADSPA_IS_HINT_TOGGLED (prh.HintDescriptor)) {
|
||||||
desc.max_unbound = false;
|
|
||||||
desc.upper = 1;
|
desc.upper = 1;
|
||||||
} else {
|
} else {
|
||||||
desc.max_unbound = true;
|
|
||||||
desc.upper = 4; /* completely arbitrary */
|
desc.upper = 4; /* completely arbitrary */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2122,9 +2122,6 @@ LV2Plugin::get_parameter_descriptor(uint32_t which, ParameterDescriptor& desc) c
|
|||||||
desc.upper *= _session.frame_rate ();
|
desc.upper *= _session.frame_rate ();
|
||||||
}
|
}
|
||||||
|
|
||||||
desc.min_unbound = false; // TODO: LV2 extension required
|
|
||||||
desc.max_unbound = false; // TODO: LV2 extension required
|
|
||||||
|
|
||||||
desc.enumeration = lilv_port_has_property(_impl->plugin, port, _world.lv2_enumeration);
|
desc.enumeration = lilv_port_has_property(_impl->plugin, port, _world.lv2_enumeration);
|
||||||
desc.scale_points = get_scale_points(which);
|
desc.scale_points = get_scale_points(which);
|
||||||
|
|
||||||
|
@ -44,8 +44,6 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter)
|
|||||||
, integer_step(parameter.type() >= MidiCCAutomation &&
|
, integer_step(parameter.type() >= MidiCCAutomation &&
|
||||||
parameter.type() <= MidiChannelPressureAutomation)
|
parameter.type() <= MidiChannelPressureAutomation)
|
||||||
, sr_dependent(false)
|
, sr_dependent(false)
|
||||||
, min_unbound(0)
|
|
||||||
, max_unbound(0)
|
|
||||||
, enumeration(false)
|
, enumeration(false)
|
||||||
{
|
{
|
||||||
ScalePoints sp;
|
ScalePoints sp;
|
||||||
@ -142,8 +140,6 @@ ParameterDescriptor::ParameterDescriptor()
|
|||||||
, largestep(0)
|
, largestep(0)
|
||||||
, integer_step(false)
|
, integer_step(false)
|
||||||
, sr_dependent(false)
|
, sr_dependent(false)
|
||||||
, min_unbound(0)
|
|
||||||
, max_unbound(0)
|
|
||||||
, enumeration(false)
|
, enumeration(false)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
@ -328,8 +328,6 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
|
|||||||
VstParameterProperties prop;
|
VstParameterProperties prop;
|
||||||
|
|
||||||
memset (&prop, 0, sizeof (VstParameterProperties));
|
memset (&prop, 0, sizeof (VstParameterProperties));
|
||||||
desc.min_unbound = false;
|
|
||||||
desc.max_unbound = false;
|
|
||||||
prop.flags = 0;
|
prop.flags = 0;
|
||||||
|
|
||||||
if (_plugin->dispatcher (_plugin, effGetParameterProperties, which, 0, &prop, 0)) {
|
if (_plugin->dispatcher (_plugin, effGetParameterProperties, which, 0, &prop, 0)) {
|
||||||
|
@ -3857,8 +3857,6 @@ OSC::route_plugin_descriptor (int ssid, int piid, lo_message msg) {
|
|||||||
flags |= pd.enumeration ? 1 : 0;
|
flags |= pd.enumeration ? 1 : 0;
|
||||||
flags |= pd.integer_step ? 2 : 0;
|
flags |= pd.integer_step ? 2 : 0;
|
||||||
flags |= pd.logarithmic ? 4 : 0;
|
flags |= pd.logarithmic ? 4 : 0;
|
||||||
flags |= pd.max_unbound ? 8 : 0;
|
|
||||||
flags |= pd.min_unbound ? 16 : 0;
|
|
||||||
flags |= pd.sr_dependent ? 32 : 0;
|
flags |= pd.sr_dependent ? 32 : 0;
|
||||||
flags |= pd.toggled ? 64 : 0;
|
flags |= pd.toggled ? 64 : 0;
|
||||||
flags |= c != NULL ? 128 : 0; // bit 7 indicates in input control
|
flags |= c != NULL ? 128 : 0; // bit 7 indicates in input control
|
||||||
|
Loading…
Reference in New Issue
Block a user