13
0

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:
Robin Gareus 2017-06-19 12:40:51 +02:00
parent 555fcb89e5
commit cb48bb0e1c
7 changed files with 0 additions and 20 deletions

View File

@ -70,8 +70,6 @@ struct LIBARDOUR_API ParameterDescriptor : public Evoral::ParameterDescriptor
float largestep;
bool integer_step;
bool sr_dependent;
bool min_unbound;
bool max_unbound;
bool enumeration;
};

View File

@ -806,8 +806,6 @@ AUPlugin::discover_parameters ()
break;
}
d.min_unbound = 0; // lower is bound
d.max_unbound = 0; // upper is bound
d.update_steps();
descriptors.push_back (d);

View File

@ -469,20 +469,17 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
if (LADSPA_IS_HINT_BOUNDED_BELOW(prh.HintDescriptor)) {
desc.min_unbound = false;
if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) {
desc.lower = prh.LowerBound * _session.frame_rate();
} else {
desc.lower = prh.LowerBound;
}
} else {
desc.min_unbound = true;
desc.lower = 0;
}
if (LADSPA_IS_HINT_BOUNDED_ABOVE(prh.HintDescriptor)) {
desc.max_unbound = false;
if (LADSPA_IS_HINT_SAMPLE_RATE(prh.HintDescriptor)) {
desc.upper = prh.UpperBound * _session.frame_rate();
} else {
@ -490,10 +487,8 @@ LadspaPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& des
}
} else {
if (LADSPA_IS_HINT_TOGGLED (prh.HintDescriptor)) {
desc.max_unbound = false;
desc.upper = 1;
} else {
desc.max_unbound = true;
desc.upper = 4; /* completely arbitrary */
}
}

View File

@ -2122,9 +2122,6 @@ LV2Plugin::get_parameter_descriptor(uint32_t which, ParameterDescriptor& desc) c
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.scale_points = get_scale_points(which);

View File

@ -44,8 +44,6 @@ ParameterDescriptor::ParameterDescriptor(const Evoral::Parameter& parameter)
, integer_step(parameter.type() >= MidiCCAutomation &&
parameter.type() <= MidiChannelPressureAutomation)
, sr_dependent(false)
, min_unbound(0)
, max_unbound(0)
, enumeration(false)
{
ScalePoints sp;
@ -142,8 +140,6 @@ ParameterDescriptor::ParameterDescriptor()
, largestep(0)
, integer_step(false)
, sr_dependent(false)
, min_unbound(0)
, max_unbound(0)
, enumeration(false)
{}

View File

@ -328,8 +328,6 @@ VSTPlugin::get_parameter_descriptor (uint32_t which, ParameterDescriptor& desc)
VstParameterProperties prop;
memset (&prop, 0, sizeof (VstParameterProperties));
desc.min_unbound = false;
desc.max_unbound = false;
prop.flags = 0;
if (_plugin->dispatcher (_plugin, effGetParameterProperties, which, 0, &prop, 0)) {

View File

@ -3857,8 +3857,6 @@ OSC::route_plugin_descriptor (int ssid, int piid, lo_message msg) {
flags |= pd.enumeration ? 1 : 0;
flags |= pd.integer_step ? 2 : 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.toggled ? 64 : 0;
flags |= c != NULL ? 128 : 0; // bit 7 indicates in input control