[SCM] calf/master: + LADSPA, DSSI: mark output ports properly (?)
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:37:58 UTC 2013
The following commit has been merged in the master branch:
commit 228a416ffbcc78928fb7e4178ebd4688f2d52756
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Thu Oct 30 21:59:18 2008 +0000
+ LADSPA, DSSI: mark output ports properly (?)
diff --git a/src/calf/giface.h b/src/calf/giface.h
index 8e94be7..d3c3bad 100644
--- a/src/calf/giface.h
+++ b/src/calf/giface.h
@@ -400,11 +400,10 @@ struct ladspa_wrapper
for (; i < ins + outs + params; i++)
{
LADSPA_PortRangeHint &prh = ((LADSPA_PortRangeHint *)descriptor.PortRangeHints)[i];
- ((int *)descriptor.PortDescriptors)[i] = i < ins ? LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO
- : i < ins + outs ? LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO
- : LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL;
- prh.HintDescriptor = LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW;
parameter_properties &pp = Module::param_props[i - ins - outs];
+ ((int *)descriptor.PortDescriptors)[i] =
+ LADSPA_PORT_CONTROL | (pp.flags & PF_PROP_OUTPUT ? LADSPA_PORT_OUTPUT : LADSPA_PORT_INPUT);
+ prh.HintDescriptor = LADSPA_HINT_BOUNDED_ABOVE | LADSPA_HINT_BOUNDED_BELOW;
((const char **)descriptor.PortNames)[i] = pp.name;
prh.LowerBound = pp.min;
prh.UpperBound = pp.max;
diff --git a/src/giface.cpp b/src/giface.cpp
index 560f7f8..91d541d 100644
--- a/src/giface.cpp
+++ b/src/giface.cpp
@@ -248,7 +248,8 @@ std::string synth::generate_ladspa_rdf(const ladspa_plugin_info &info, parameter
for (unsigned int i = 0; i < count; i++) {
rdf +=
" <ladspa:hasPort>\n"
- " <ladspa:InputControlPort rdf:about=\"" + plugin_id + "."+i2s(ctl_ofs + i)+"\" "
+ " <ladspa:" + string(params[i].flags & PF_PROP_OUTPUT ? "Output" : "Input")
+ + "ControlPort rdf:about=\"" + plugin_id + "."+i2s(ctl_ofs + i)+"\" "
+ unit_to_string(params[i]) +
"ladspa:hasLabel=\"" + params[i].short_name + "\" "
+ scale_to_string(params[i]) +
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list