[SCM] calf/master: Restore variables in order of get_configure_vars in calfjackhost.
js at users.alioth.debian.org
js at users.alioth.debian.org
Tue May 7 15:40:33 UTC 2013
The following commit has been merged in the master branch:
commit b1d968fb2d2dfd25eadde58726b2fc2d74b89e89
Author: Krzysztof Foltman <wdev at foltman.com>
Date: Sat Jan 1 16:56:20 2011 +0000
Restore variables in order of get_configure_vars in calfjackhost.
Also, for missing variables, calls configure with NULL so that it
can be set to default value by the plugin.
diff --git a/src/preset.cpp b/src/preset.cpp
index 23df7ef..ef959cc 100644
--- a/src/preset.cpp
+++ b/src/preset.cpp
@@ -95,10 +95,18 @@ void plugin_preset::activate(plugin_ctl_iface *plugin)
}
plugin->set_param_value(pos->second, values[i]);
}
- for (map<string, string>::iterator i = variables.begin(); i != variables.end(); i++)
+ const char *const *vnames = metadata->get_configure_vars();
+ if (vnames)
{
- printf("configure %s: %s\n", i->first.c_str(), i->second.c_str());
- plugin->configure(i->first.c_str(), i->second.c_str());
+ for (; *vnames; vnames++)
+ {
+ const char *key = *vnames;
+ map<string, string>::const_iterator i = variables.find(key);
+ if (i == variables.end())
+ plugin->configure(key, NULL);
+ else
+ plugin->configure(key, i->second.c_str());
+ }
}
}
--
calf audio plugins packaging
More information about the pkg-multimedia-commits
mailing list