Remove generic parameter-printer

This has been superseded by value_as_string() along with meta-data
from parameter-descriptor, which is supported by all standards, except VST.
This commit is contained in:
Robin Gareus
2019-03-11 02:10:50 +01:00
parent 4964852f0b
commit 484e0d0fb2
11 changed files with 6 additions and 61 deletions

View File

@@ -90,7 +90,6 @@ class LIBARDOUR_API AUPlugin : public ARDOUR::Plugin
std::string describe_parameter (Evoral::Parameter);
IOPortDescription describe_io_port (DataType dt, bool input, uint32_t id) const;
std::string state_node_name () const { return "audiounit"; }
void print_parameter (uint32_t, char*, uint32_t len) const;
bool parameter_is_audio (uint32_t) const;
bool parameter_is_control (uint32_t) const;

View File

@@ -88,7 +88,6 @@ class LIBARDOUR_API LadspaPlugin : public ARDOUR::Plugin
std::string describe_parameter (Evoral::Parameter);
std::string state_node_name() const { return "ladspa"; }
void print_parameter (uint32_t, char*, uint32_t len) const;
bool parameter_is_audio(uint32_t) const;
bool parameter_is_control(uint32_t) const;

View File

@@ -92,7 +92,6 @@ public:
pframes_t nframes, samplecnt_t offset);
std::string describe_parameter (Evoral::Parameter);
void print_parameter (uint32_t, char*, uint32_t len) const;
boost::shared_ptr<ScalePoints> get_scale_points(uint32_t port_index) const;
bool parameter_is_audio (uint32_t) const { return false; }

View File

@@ -118,10 +118,6 @@ class LIBARDOUR_API LV2Plugin : public ARDOUR::Plugin, public ARDOUR::Workee
std::string describe_parameter (Evoral::Parameter);
std::string state_node_name () const { return "lv2"; }
void print_parameter (uint32_t param,
char* buf,
uint32_t len) const;
bool parameter_is_audio (uint32_t) const;
bool parameter_is_control (uint32_t) const;
bool parameter_is_event (uint32_t) const;

View File

@@ -121,7 +121,7 @@ class LIBARDOUR_API Plugin : public PBD::StatefulDestructible, public HasLatency
virtual std::set<Evoral::Parameter> automatable() const = 0;
virtual std::string describe_parameter (Evoral::Parameter) = 0;
virtual std::string state_node_name() const = 0;
virtual void print_parameter (uint32_t, char*, uint32_t len) const = 0;
virtual bool print_parameter (uint32_t, char*, uint32_t len) const { return false; }
virtual bool parameter_is_audio(uint32_t) const = 0;
virtual bool parameter_is_control(uint32_t) const = 0;

View File

@@ -85,7 +85,7 @@ public:
const char * maker () const;
int32_t version () const;
uint32_t parameter_count () const;
void print_parameter (uint32_t, char*, uint32_t len) const;
bool print_parameter (uint32_t, char*, uint32_t len) const;
bool has_editor () const;

View File

@@ -2035,19 +2035,6 @@ AUPlugin::describe_parameter (Evoral::Parameter param)
}
}
void
AUPlugin::print_parameter (uint32_t param, char* buf, uint32_t len) const
{
// NameValue stuff here
if (buf && len) {
if (param < parameter_count()) {
snprintf (buf, len, "%.3f", get_parameter (param));
} else {
strcat (buf, "0");
}
}
}
bool
AUPlugin::parameter_is_audio (uint32_t) const
{

View File

@@ -615,18 +615,6 @@ LadspaPlugin::parameter_is_input (uint32_t param) const
return LADSPA_IS_PORT_INPUT(port_descriptor (param));
}
void
LadspaPlugin::print_parameter (uint32_t param, char *buf, uint32_t len) const
{
if (buf && len) {
if (param < parameter_count()) {
snprintf (buf, len, "%.3f", get_parameter (param));
} else {
strcat (buf, "0");
}
}
}
boost::shared_ptr<ScalePoints>
LadspaPlugin::get_scale_points(uint32_t port_index) const
{

View File

@@ -1003,18 +1003,6 @@ LuaProc::describe_parameter (Evoral::Parameter param)
return "??";
}
void
LuaProc::print_parameter (uint32_t param, char* buf, uint32_t len) const
{
if (buf && len) {
if (param < parameter_count ()) {
snprintf (buf, len, "%.3f", get_parameter (param));
} else {
strcat (buf, "0");
}
}
}
boost::shared_ptr<ScalePoints>
LuaProc::parse_scale_points (luabridge::LuaRef* lr)
{

View File

@@ -3066,18 +3066,6 @@ LV2Plugin::designated_bypass_port ()
return UINT32_MAX;
}
void
LV2Plugin::print_parameter(uint32_t param, char* buf, uint32_t len) const
{
if (buf && len) {
if (param < parameter_count()) {
snprintf(buf, len, "%.3f", get_parameter(param));
} else {
strcat(buf, "0");
}
}
}
boost::shared_ptr<ScalePoints>
LV2Plugin::get_scale_points(uint32_t port_index) const
{

View File

@@ -806,7 +806,7 @@ VSTPlugin::has_editor () const
return _plugin->flags & effFlagsHasEditor;
}
void
bool
VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t /*len*/) const
{
char *first_nonws;
@@ -814,7 +814,7 @@ VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t /*len*/) const
_plugin->dispatcher (_plugin, 7 /* effGetParamDisplay */, param, 0, buf, 0);
if (buf[0] == '\0') {
return;
return false;
}
first_nonws = buf;
@@ -823,10 +823,11 @@ VSTPlugin::print_parameter (uint32_t param, char *buf, uint32_t /*len*/) const
}
if (*first_nonws == '\0') {
return;
return false;
}
memmove (buf, first_nonws, strlen (buf) - (first_nonws - buf) + 1);
return true;
}
void