libao doesn't understand MacOS X dynamic libraries
I'm using Mac OS X 10.1.5, and fink from cvs. The standard fink package of libao doesn't allow any output besides .wav, .raw and null, despite the fact that the libao tarball includes an ESD driver (and I have ESD installed, madplay and xmms use it happily) and an OS X CoreAudio driver. So I downloaded libao-0.8.3 from the Vorbis site and compiled it - exactly the same situation. I began to poke around in the code. It seems libao has some issues with Mac OS X's implementation of dynamic libraries. I have the fink dlcompat library installed, which mostly does the right thing, but there's two places that stuff up: * In src/audio_out.c at line 43, "SHARED_LIB_EXT" is defined as ".so". On Mac OS X, shared libraries end in ".dylib". Oddly, the libao plugins are built and installed as files ending in ".dylib", but libao ignores them because they have the wrong extension. * At about line 112 and following of the same file, libao has dlopened the file in question and begins poking around for proper symbols to be defined. By default all of these fail - libao looks for functions like "ao_plugin_test", while the library exports "_ao_plugin_test". After fixing both of the above in a highly hackish manner, recompiling and installing libao, I now have the ESD plugin working properly. and ao_example.c behaves as appropriate. I won't attach a patch, though, because I'm sure that my changes would break every other platform out there.