Hi!

I've been working with an xmms plugin the last few days, and I seem to have found a 
bug in libasound.so.

Calling snd_pcm_open(...) in a program compiled as an executable binary works fine (ie 
it returns no errors, and doesn't die). But if compiled as part of a dynamic library, 
say an xmms output plugin, it dies, with the following error messages:

ALSA lib dlmisc.c:99:(snd_dlsym_verify) unable to verify version for symbol 
and_config_hook_load

ALSA lib conf.c:2287:(snd_config_hooks_call) symbol snd_config_hook_load is not 
defined inside (null)

I am still working on the second one, but I found a solution to the first one.

The problem, is in dlmisc.c at line 2278:
 h = snd_dlopen(lib, RTLD_NOW);

I'm not really sure why, but *lib is null at this point. The result is that when 
dlopen is called, inside snd_dlopen, the filename is null, which dlopen takes to mean 
the main program (according to the man page). With a standard binary executable, 
that's fine, because-actually, I'm not sure why that's ok. But I would venture to 
guess it has to do with libasound getting loaded with the binary. But when compiling a 
dynamic library, the main program is something else - in this case xmms, which knows 
nothing about libasound (all the alsa stuff in inside the plugin).

I did managed to fix the problem, but my solution is a hack. in the call to 
snd_dlopen, I replaced lib with "/usr/lib/libasound.so", explicitly telling  it to 
load the asound library. Now, the error is gone (the first one. I havent' gotten to 
the second, although I suspect it is similar). Anyone know how to fix ths properly?


Kyle Centers.



-- 

_______________________________________________
Sign-up for your own FREE Personalized E-mail at Mail.com
http://www.mail.com/?sr=signup


1 cent a minute calls anywhere in the U.S.!

http://www.getpennytalk.com/cgi-bin/adforward.cgi?p_key=RG9853KJ&url=http://www.getpennytalk.com



_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to