[ardour-dev] Re: Ardour plugin bug
Paul Davis
paul at linuxaudiosystems.com
Sat May 15 21:48:22 PDT 2004
>trouble with GVerb - go figure. I recompiled with --disable-optimize
>and ran valgrind. Attached is the dump. Gotta go play music now. I'll
>check back in the morning. Oh, BTW, I am sure glad I went ahead and
>reloaded. Everything is much easier to deal with now.
great... the valgrind trace wasn't much use but your msg prompted me
to figure out the problem.
the code to store/load presets pays no attention to the existence of
*output* ports on a plugin. SC4 has two of them. they are not
represented in the GUI by the usual widgets, and of course, its
conceptually wrong for the preset to store the values.
i fixed it so that the presets from now on will not contain output
parameter values, *and* loading presets that do will just ignore them.
i include a diff below so you can confirm this without a total recompile:
--p
Index: ladspa_plugin.cc
===================================================================
RCS file: /home/las/cvsroot/ardour/ardour/libs/ardour/ladspa_plugin.cc,v
retrieving revision 1.54
diff -u -u -r1.54 ladspa_plugin.cc
--- ladspa_plugin.cc 9 May 2004 03:47:15 -0000 1.54
+++ ladspa_plugin.cc 16 May 2004 04:47:14 -0000
@@ -389,7 +389,9 @@
if (defs) {
for (int i = 0; i < defs->count; ++i) {
- set_parameter(defs->items[i].pid, defs->items[i].value);
+ if (parameter_is_input (defs->items[i].pid)) {
+ set_parameter(defs->items[i].pid, defs->items[i].value);
+ }
}
lrdf_free_setting_values(defs);
}
@@ -568,8 +570,10 @@
defaults.items = portvalues;
for (unsigned int i = 0; i < parameter_count(); ++i) {
- portvalues[i].pid = i;
- portvalues[i].value = get_parameter(i);
+ if (parameter_is_input (i)) {
+ portvalues[i].pid = i;
+ portvalues[i].value = get_parameter(i);
+ }
}
char* envvar;
More information about the Ardour-Dev
mailing list