2009/6/25 Jan Weil <jan.weil@web.de>
On Thu, Jun 25, 2009 at 05:25:48AM +0200, Stefano D'Angelo wrote:
> 2009/6/24 David Robillard <dave@drobilla.net>:
> > On Wed, 2009-06-24 at 17:55 +0200, Stefano D'Angelo wrote:
> >> Hereby I propose some default paths which could be used, in the hope
> >> that API authors lurking around here might want to recommend them and
> >> host authors might want to use them:
> >>
> >> LADSPA
> >>   Unix-like OSes with FHS/Unix-like filesystem layout:
> >> /usr/lib/ladspa, /usr/local/lib/ladspa, ~/.ladspa
> >>   Windows: %PROGRAMFILES%\LADSPA, %APPDATA%\LADSPA
> >>   Mac OS X: /Library/Audio/Plug-Ins/LADSPA, ~/Library/Audio/Plug-Ins/LADSPA
> >>
> >> DSSI
> >>   Unix-like OSes with FHS/Unix-like filesystem layout: /usr/lib/dssi,
> >> /usr/local/lib/dssi, ~/.dssi
> >>   Windows: %PROGRAMFILES%\DSSI, %APPDATA%\DSSI
> >>   Mac OS X: /Library/Audio/Plug-Ins/DSSI, ~/Library/Audio/Plug-Ins/DSSI
> >>
> >> LV2
> >>   Unix-like OSes with FHS/Unix-like filesystem layout: /usr/lib/lv2,
> >> /usr/local/lib/lv2, ~/.lv2
> >>   Windows: %PROGRAMFILES%\LV2, %APPDATA%\LV2
> >>   Mac OS X: /Library/Audio/Plug-Ins/LV2, ~/Library/Audio/Plug-Ins/LV2
> >
> > Note the order matters for PATH-like variables such as these.
>
> Apart from the "evaluate the path variable before using the default" I
> don't see how the order should matter. Am I missing something?

I guess it might matter if you have multiple version of the same plugin
installed, depending on how the application references the plugins.
Ecasound, for example, uses LADSPA unique ids if I remember correctly,
which means only one of the multiple versions will be usable. Which one
that is probably depends on the order of the paths.

That is bad of Ecasound, since ladspa.h says:

"Plugin types should be identified by file and label rather than by index or plugin name, which may be changed in new plugin versions."

In case of multiple occourrences, myabe it's better to check for stat()'s st_mtime to decide which one to load? However, I don't see any of such mechanisms officially specified anywhere (apart from the "If present, this should contain a colon-separated path indicating directories that should be searched  (in order) when loading plugin types." in ladspa.h, which really means nothing)...

Stefano