Confused looking at effect code

Jeremy Salwen <[email protected]>
Newsgroups gmane.comp.audio.ecasound.general
Message-ID <[email protected]>
Hi All, hopefully a dev can help me with this:

looking at this block in the ladspa effect:


  for(unsigned long m = 0; m < port_count_rep; m++) {
    ...
    if (lilv_port_is_a(port, LILV_PORT_CLASS_CONTROL)) {

      struct PARAM_DESCRIPTION pd;
      parse_parameter_hint_information(m, params.size() + 1, &pd);

      params.push_back(pd.default_value);
      param_descs_rep.push_back(pd);
      if (params.size() > 1) param_names_rep += ",";
      string tmp
(kvu_string_search_and_replace(string(plugin_desc->PortNames[m]), ",",
"\\,"));
      param_names_rep += kvu_string_search_and_replace(tmp, ":", "\\:");
    }
  }

And also the snipped from parse_parameter_hint_information:

{
  ...
  pd->description = get_parameter_name(paramnum);
  ...
}

It seems to me that what is happening is

for each port {
  parse parameter => get_parameter_name=> read the n'th element of
param_names_rep
  add the port name taken from plugin_desc->PortNames to the n'th place of
param_names_rep
}

This is why I am confused.  It seems that we read the port name from the
list (in a roundabout way) before the name is even placed there.  Is there
some sort of other source for port names which get_parameter_name is somehow
accessing?  Are ports different than parameters, and that's what's confusing
me?

Thanks for the help,
Jeremy Salwen

------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev

_______________________________________________
Ecasound-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ecasound-list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.