On Tue, 5 Feb 2002 [EMAIL PROTECTED] wrote:
> I am writing a Python extension module for the ALSA PCM device,
> because I am interested in real-time audio processing with Python
> scripts. This may sound weird first, but Python is fast enough
[...]
> Now I'm writing an pure C extension for ALSA-0.9 . I encountered
> the following strange problem:
[...]
> jnix@sirrah:~/zosma/rtaudio > ./test.py default
> ALSA lib dlmisc.c:97:(snd_dlsym_verify) unable to verify version for symbol
>snd_config_hook_load
> ALSA lib conf.c:2452:(snd_config_hooks_call) symbol snd_config_hook_load is not
>defined inside (null)
> ALSA lib conf.c:2859:(snd_config_update_r) hooks failed, removing configuration
I've encountered same problem with pyecasound (a python port of ecasound's
ECI API; also provides access to ALSA (among many, many other things)).
The problem is that by default, python doesn't load its extension modules
with RTLD_GLOBAL dlopen() flag. This prevents alsa-lib from dynamically
loading its own plugins (libasound support functions are not visible to
the plugins).
Luckily, Python2.2 provides a solution that doesn't involve patching and
recompiling python:
--cut--
import sys
import DLFCN
sys.setdlopenflags(DLFCN.RTLD_LAZY|DLFCN.RTLD_GLOBAL)
from pyecasound import *
--cut--
... where pyecasound is the actual C-extension.
--
http://www.eca.cx
Audio software for Linux!
_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel