install = buf;
snprintf(buf, sizeof(buf), "_snd_pcm_hook_%s_install", str);
}
- h = dlopen(lib, RTLD_NOW);
- install_func = h ? dlsym(h, install) : NULL;
+ h = snd_dlopen(lib, RTLD_NOW);
+ install_func = h ? snd_dlsym(h, install, SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION)) : NULL;
err = 0;
if (!h) {
SNDERR("Cannot open shared library %s", lib);
err = -ENOENT;
} else if (!install_func) {
SNDERR("symbol %s is not defined inside %s", install, lib);
- dlclose(h);
+ snd_dlclose(h);
err = -ENXIO;
}
_err:
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);
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;
return 1;
}
}
- dlclose(handle);
+ snd_dlclose(handle);
}
return -ENOENT;
}
open_name = buf;
snprintf(buf, sizeof(buf), "_snd_pcm_scope_%s_open", str);
}
- h = dlopen(lib, RTLD_NOW);
- open_func = h ? dlsym(h, open_name) : NULL;
+ h = snd_dlopen(lib, RTLD_NOW);
+ open_func = h ? snd_dlsym(h, open_name, SND_DLSYM_VERSION(SND_PCM_DLSYM_VERSION)) : NULL;
err = 0;
if (!h) {
SNDERR("Cannot open shared library %s", lib);
err = -ENOENT;
} else if (!open_func) {
SNDERR("symbol %s is not defined inside %s", open_name, lib);
- dlclose(h);
+ snd_dlclose(h);
err = -ENXIO;
}
_err: