fixed dlopen & co. for hook, ladspa and meter types.

This commit is contained in:
Takashi Iwai 2003-01-20 17:15:54 +00:00
parent a8a71d5781
commit 2dc8cba51c
3 changed files with 10 additions and 10 deletions

View file

@ -156,7 +156,7 @@ static void snd_pcm_ladspa_free_plugins(struct list_head *plugins)
while (!list_empty(plugins)) {
snd_pcm_ladspa_plugin_t *plugin = list_entry(plugins->next, snd_pcm_ladspa_plugin_t, list);
if (plugin->dl_handle)
dlclose(plugin->dl_handle);
snd_dlclose(plugin->dl_handle);
if (plugin->filename)
free(plugin->filename);
list_del(&plugin->list);
@ -718,9 +718,9 @@ static int snd_pcm_ladspa_check_file(snd_pcm_ladspa_plugin_t * const plugin,
void *handle;
assert(filename);
handle = dlopen(filename, RTLD_LAZY);
handle = snd_dlopen(filename, RTLD_LAZY);
if (handle) {
LADSPA_Descriptor_Function fcn = (LADSPA_Descriptor_Function)dlsym(handle, "ladspa_descriptor");
LADSPA_Descriptor_Function fcn = (LADSPA_Descriptor_Function)snd_dlsym(handle, "ladspa_descriptor", SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION));
if (fcn) {
long idx;
const LADSPA_Descriptor *d;
@ -737,7 +737,7 @@ static int snd_pcm_ladspa_check_file(snd_pcm_ladspa_plugin_t * const plugin,
return 1;
}
}
dlclose(handle);
snd_dlclose(handle);
}
return -ENOENT;
}