Re: [LAD] Re : Saving plugin presets

From: Paul Davis <paul@email-addr-hidden>
Date: Sat Jan 24 2009 - 14:00:53 EET

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;

_______________________________________________
Linux-audio-dev mailing list
Linux-audio-dev@email-addr-hidden
http://lists.linuxaudio.org/mailman/listinfo/linux-audio-dev
Received on Sat Jan 24 16:15:01 2009

This archive was generated by hypermail 2.1.8 : Sat Jan 24 2009 - 16:15:01 EET