[LAD] Re : Saving plugin presets

Paul Davis paul at linuxaudiosystems.com
Sat Jan 24 12:00:53 UTC 2009


On Fri, 2009-01-23 at 20:45 +0200, Stefan Kost wrote:
> Paul Davis schrieb:
> > On Wed, 2009-01-21 at 23:07 +0200, Stefan Kost wrote:
> > 
> >> Seems to be a nice library, but it looks already too capable for the task at
> >> hand. The idea is to agree on a simple format, so that we don't add a hidden
> >> dependency for a certain library to parse it. Therefore no xml, rdf etc..
> > 
> > No, no, and a hundred times no. This is the code needed in ardour to
> > load a named preset:
> 
> I got ensure in a previous thread, that the rdf approach is flawed, as you can't
> get a list of presets for each plugin. I got no answer how its supposed to work.
> What an application would want to do is:
> * scan LADSPA_PATH for plugins
> * get the rdf blob for each
> * build a list of presets for each plugin

given a unique integral ID for a plugin:

	lrdf_uris* set_uris = lrdf_get_setting_uris(id);

	if (set_uris) {
		for (uint32_t i = 0; i < (uint32_t) set_uris->count; ++i) {
			if (char* label = lrdf_get_label(set_uris->items[i])) {
				labels.push_back(label);
				presets[label] = set_uris->items[i];
			}
		}
		lrdf_free_uris(set_uris);
	}

	// GTK2FIX find an equivalent way to do this with a vector (needed by
GUI apis)
	// labels.unique();

	return labels;





More information about the Linux-audio-dev mailing list