[SCM] calf/master: + GUI: do not require custom GUI for just a filter graph
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:38:24 UTC 2013
The following commit has been merged in the master branch:
commit 6b4d9e54355c6e655e3fea7ca9be7bcf8c88887d
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Fri Nov 7 19:08:08 2008 +0000
+ GUI: do not require custom GUI for just a filter graph
diff --git a/src/calf/giface.h b/src/calf/giface.h
index 18172f5..5331649 100644
--- a/src/calf/giface.h
+++ b/src/calf/giface.h
@@ -79,6 +79,7 @@ enum parameter_flags
PF_PROP_OUTPUT_GAIN=0x050000, ///< epp:outputGain + skip epp:hasStrictBounds
PF_PROP_OUTPUT = 0x080000, ///< output port
PF_PROP_OPTIONAL = 0x100000, ///< connection optional
+ PF_PROP_GRAPH = 0x200000, ///< add graph
PF_UNITMASK = 0xFF000000, ///< bit mask for units \todo reduce to use only 5 bits
PF_UNIT_DB = 0x01000000, ///< decibels
diff --git a/src/makerdf.cpp b/src/makerdf.cpp
index db0ba83..833c65d 100644
--- a/src/makerdf.cpp
+++ b/src/makerdf.cpp
@@ -636,7 +636,14 @@ void make_gui(string path_prefix)
plugin_metadata_iface *pi = plugins[i];
stringstream xml;
- xml << "<table rows=\"" << pi->get_param_count() << "\" cols=\"3\">\n";
+ int graphs = 0;
+ for (int j = 0; j < pi->get_param_count(); j++)
+ {
+ parameter_properties &props = *pi->get_param_props(j);
+ if (props.flags & PF_PROP_GRAPH)
+ graphs++;
+ }
+ xml << "<table rows=\"" << pi->get_param_count() << "\" cols=\"" << (graphs ? "4" : "3") << "\">\n";
for (int j = 0; j < pi->get_param_count(); j++)
{
if (j)
@@ -704,6 +711,21 @@ void make_gui(string path_prefix)
if (!ctl.empty())
xml << ctl;
}
+ if (graphs)
+ {
+ xml << " <if cond=\"directlink\">" << endl;
+ xml << " <vbox expand-x=\"1\" fill-x=\"1\" attach-x=\"3\" attach-y=\"0\" attach-h=\"" << pi->get_param_count() << "\">" << endl;
+ for (int j = 0; j < pi->get_param_count(); j++)
+ {
+ parameter_properties &props = *pi->get_param_props(j);
+ if (props.flags & PF_PROP_GRAPH)
+ {
+ xml << " <line-graph refresh=\"1\" width=\"160\" param=\"" << props.short_name << "\"/>\n" << endl;
+ }
+ }
+ xml << " </vbox>" << endl;
+ xml << " </if>" << endl;
+ }
xml << "</table>\n";
FILE *f = fopen((path_prefix+string(pi->get_id())+".xml").c_str(), "w");
fprintf(f, "%s\n", xml.str().c_str());
diff --git a/src/modules.cpp b/src/modules.cpp
index e7a66e7..28c62ee 100644
--- a/src/modules.cpp
+++ b/src/modules.cpp
@@ -95,7 +95,7 @@ const char *filter_choices[] = {
};
CALF_PORT_PROPS(filter) = {
- { 2000, 10,20000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ, NULL, "freq", "Frequency" },
+ { 2000, 10,20000, 0, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_HZ | PF_PROP_GRAPH, NULL, "freq", "Frequency" },
{ 0.707, 0.707, 20, 0, PF_FLOAT | PF_SCALE_GAIN | PF_CTL_KNOB | PF_UNIT_COEF, NULL, "res", "Resonance" },
{ 0, 0, 5, 1, PF_ENUM | PF_CTL_COMBO, filter_choices, "mode", "Mode" },
{ 20, 5, 100, 20, PF_FLOAT | PF_SCALE_LOG | PF_CTL_KNOB | PF_UNIT_MSEC, NULL, "inertia", "Inertia"},
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list