From: Chris C. <ca...@al...> - 2005-01-15 20:16:22
|
On Saturday 15 Jan 2005 19:19, Iain Young wrote: > (a) [using LADSPA as well as DSSI path] is now done. Okay, its > hackery, but it works, or seems to for me. Ouch -- you're modifying the environment that the variable comes from with that call to strcat(), and there's no guarantee you'll have enough room to be able to do that anyway. You'll need to copy them both into a buffer that you've already ensured is big enough. On this subject, though, there is another question. I think jack-dssi-host originally used to use the LADSPA path as well as the DSSI one, although in a different way -- it fell back on LADSPA_PATH if DSSI_PATH was not set. But I changed it because I thought it was confusing matters for it to be able to pick up DSSI plugins outside of the DSSI path. Perhaps we should ensure that it only uses the LADSPA path for LADSPA plugins and the DSSI path for DSSI plugins? (That is actually what Rosegarden does, although that's hardly conclusive.) > I've also added a LADSPA example to the help text. It's not actually specific to LADSPA though, is it? It's an example of setting a port value on the command line, but that would apply equally to DSSI plugins. > 1) Around line 1275 of jack-dssi-host.c, where I actually put the > values into the plugin instances. Can I just nuke that call to > get_port_default, since I seem to just stomp all over the work it > just did anyway ? Well, at the moment you're stomping all over it with uninitialised values for any ports that were not specified on the command line. You would need to initialise your float array with the default values for the ports before reading the values from the command line. This makes it clear too that a fixed size for the float array is inadequate, as a LADSPA plugin can have any number of ports (up to an unsigned long or something). In any case a fixed array is not suitable when you're reading an arbitrary number of values from the command line. On reflection I'm not actually sure I like extending the command line syntax to do things like setting port values. It kind of poses questions of where the limits should be -- if we allow setting port values, shouldn't we allow selecting the program for a DSSI plugin as well? and making configuration calls? etc -- as well as of ambiguity -- for example, ":" and "," are both valid characters in a LADSPA or DSSI plugin label. It might be better with a more structured syntax (a flag to set a port value), but better still might be a more general way to do these things, such as a more powerful command-line OSC client or parsing stdin. Chris |