[Clam-devel] COMMIT 11822 - Re: Faust support - plugins dynamic reloading
Natanael Olaiz
nolaiz at gmail.com
Mon Aug 4 02:02:20 PDT 2008
El 08/04/2008 05:59 AM, David García Garzón escribió:
> El Monday 04 August 2008 10:34:24 Natanael Olaiz va escriure:
>
>> Commit 11822:
>>
>> * Factory:
>> - Registry::CommonReplaceCreator delete the old creator, if
>> exists.
>> - It need to be called twice for now: the first with a NULL
>> creator to erase the previously, then make the new creator instance
>> and call again with the new pointer.
>> * LadspaWrapper: Fix: the destructor now calls a dlclose() after
>> the dlopen on LoadLibraryFunction instantiation
>> * LadspaWrapperCreator: Added (comented) debug messages (to help
>> further development on ladspa plugins)
>> * RunTimeFaustLibraryLoader:
>> - comented loading debug messages
>> - adapted the twice calls to factory.AddCreatorReplace (see
>> above CommonReplaceCreator comment). TODO: refactor this
>> - added a call to dlclose() after the dlopen() used to
>> explore the plugin library (called on
>> RunTimeLibraryLoader::FullyLoadLibrary)
>>
>>
>> I left some debug messages (commented) to help further improvements on
>> the ladspa libraries management.
>>
>> David: I did it just on the Faust support, but it could be easily
>> applied on the general ladspa support. Just a comment: the
>> RunTimeLibraryLoader library loader doesn't use dlopen on windows, so if
>> in the future some ladspa support exists under windows, the dlclose() on
>> RunTimeFaustLibraryLoader will doesn't work. Anyway, all the others
>> ladspa implementations uses the "dlfcn.h" methods...
>>
>>
>> Regards,
>> Natanael.
>>
>> El 08/04/2008 02:12 AM, Natanael Olaiz escribió:
>>
>>> Finally!!
>>>
>>> Here is a patch for the reload issue. Without cleaning up yet, but it
>>> works :-)
>>> Plus it have yet the debug messages, if you want to see what happens.
>>>
>>> The only problem is that if you have a ladspa plugin on the actual
>>> canvas network, you have to delete it and put it again to actualize.
>>> (I'll put an automatic deleter/loader)... But it works! (I'm happy :))
>>>
>>>
>>> Regards,
>>> Natanael.
>>> PS: I used RTLD_NOW instead RTLD_LAZY on dlopen(). I think the
>>> original LAZY have to work too, I'll check it now.
>>>
>
> LAZY is needed there. It checks for a given symbol that is only present on
> Ladspa plugins to avoid loading a dynamic lib that is not a ladspa.
>
OK, I left the NOW as commented code, but returned the original LAZY on
the commit.
More information about the clam-devel
mailing list