Changeset 712
- Timestamp:
- 04/11/10 12:02:58 (2 years ago)
- Files:
-
- libremix/trunk/TODO (modified) (1 diff)
- libremix/trunk/src/libremix/remix_context.c (modified) (1 diff)
- libremix/trunk/src/libremix/remix_plugin.c (modified) (4 diffs)
- libremix/trunk/src/libremix/remix_private.h (modified) (1 diff)
- libremix/trunk/src/plugins/ladspa/remix_ladspa.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
libremix/trunk/TODO
r709 r712 14 14 15 15 ladspa: 16 * implement plugin->destroy17 * keep module pointer returned by dlopen() in remix-ladspa.c, and18 call dlclose() on that from remix_purge().19 16 * free schemes created for each ladspa port libremix/trunk/src/libremix/remix_context.c
r553 r712 48 48 world->purging = 1; 49 49 50 cd_list_apply (env, world->plugins, (CDFunc)remix_plugin_destroy);51 world->plugins = cd_list_free (env, world->plugins);52 53 /* XXX: remix_destroy_list (env, world->plugins); */54 /* XXX: remix_destroy_list (env, world->bases); */50 world->plugins = cd_list_destroy_with (env, world->plugins, remix_plugin_destroy); 51 remix_plugin_defaults_unload (env); 52 53 /* TODO: remix_destroy_list (env, world->plugins); */ 54 /* TODO: remix_destroy_list (env, world->bases); */ 55 55 remix_channelset_defaults_destroy (env); 56 56 remix_free (ctx); libremix/trunk/src/libremix/remix_plugin.c
r553 r712 42 42 #include "remix.h" 43 43 44 static CDList * modules_list = CD_EMPTY_LIST; 45 44 46 static CDList * 45 47 remix_plugin_initialise_static (RemixEnv * env) … … 60 62 { 61 63 void * module; 64 CDList * l; 62 65 RemixPluginInitFunc init; 63 66 … … 70 73 return CD_EMPTY_LIST; 71 74 } 75 76 /* Check that this module has not already been loaded (eg. if it is 77 * a symlink etc.) */ 78 for (l = modules_list; l; l = l->next) { 79 if (l->data.s_pointer == module) { 80 dlclose (module); 81 return CD_EMPTY_LIST; 82 } 83 } 84 85 modules_list = cd_list_append (env, modules_list, CD_POINTER(module)); 72 86 73 87 if ((init = dlsym (module, "remix_load")) != NULL) { … … 131 145 } 132 146 147 static int 148 remix_plugin_unload (RemixEnv * env, void * module) 149 { 150 RemixPluginInitFunc unload; /* TODO: make new unload type */ 151 152 if ((unload = dlsym (module, "remix_unload")) != NULL) { 153 unload (env); 154 } 155 156 dlclose (module); 157 158 return 0; 159 } 160 161 void 162 remix_plugin_defaults_unload (RemixEnv * env) 163 { 164 CDList * l; 165 166 modules_list = cd_list_destroy_with (env, modules_list, (CDDestroyFunc)remix_plugin_unload); 167 } 168 133 169 #if 0 134 170 libremix/trunk/src/libremix/remix_private.h
r553 r712 287 287 /* remix_plugin */ 288 288 void remix_plugin_defaults_initialise (RemixEnv * env); 289 void remix_plugin_defaults_unload (RemixEnv * env); 289 290 290 291 /* remix_deck */ libremix/trunk/src/plugins/ladspa/remix_ladspa.c
r708 r712 874 874 RemixMetaText * mt; 875 875 RemixParameterScheme * scheme; 876 CDList * plugins = CD_EMPTY_LIST;876 CDList * l, * plugins = CD_EMPTY_LIST; 877 877 #define BUF_LEN 256 878 878 static char buf[BUF_LEN]; … … 886 886 module = dlopen (path, RTLD_NOW); 887 887 if (!module) return CD_EMPTY_LIST; 888 889 /* Check that this module has not already been loaded (eg. if it is 890 * a symlink etc.) */ 891 for (l = modules_list; l; l = l->next) { 892 if (l->data.s_pointer == module) { 893 dlclose (module); 894 return CD_EMPTY_LIST; 895 } 896 } 897 898 modules_list = cd_list_append (env, modules_list, CD_POINTER(module)); 888 899 889 900 if ((desc_func = dlsym (module, "ladspa_descriptor"))) { … … 1029 1040 dlclose(l->data.s_pointer); 1030 1041 } 1031 } 1032 1042 1043 modules_list = NULL; 1044 } 1045
