[vorbis-dev] libao and OS X
marquis logan
nibs at mac.com
Wed Nov 7 19:57:47 PST 2001
On Monday, November 5, 2001, at 11:04 PM, David A. Gatwood wrote:
> On Mon, 5 Nov 2001 captoblivious at mac.com wrote:
>
>> ARGH! I hate my school's mail server. Sorry if you've gotten this more
>> than once.
>
> About five times. And replied to it once. I forwarded you my reply,
> but
> I'm guessing it never reached you, so I'll reply again.
>
>
>> OK, so the story so far. Wanted to play with libao and the macosx
>> plugin
>> for it, see if I can bend it to my will, have a nice interface for
>> playing
>> sound in OS X.
>> With utilities from fink (such as automake), it compiles just
>> beautiful.
>> Great.
>> Problem is, it refuses to load up any of the plugins (in this case the
>> esd
>> and macosx plugins, either of which would be useful to me).
>> First problem: libao expects plugins to have the ".so" extension, when
>> really they have the ".dylib" extension. I made a quick hack to fix
>> this,
>> to see if that was really the problem...
>> Sure enough, there's more.
>> Second problem. For reasons beyond me (because I know not about such
>> things), dlopen() refuses to open the plugins. In _get_plugin() in
>> audio_out.c (line 101 or so), dlopen() is called to open the
>> prospective
>> plugin: in each case, it fails.
>
> dlopen() is part of libcompat, which is for loading .so libraries, not
> .dylibs. I don't recall the exact API for using .dylib libraries, but
> it
> is quite different. You can't mix and match, so you need to either
> compile as .so libs and use dlopen or compile as .dylib libs and use the
> dyld stuff. The easiest thing to do would probably be to tweak the
> makefiles slightly to generate .so files, at least for now.
>
>
> Later
> David
>
.dylib's are just dynamic libs that get loaded automatically by dyld and
can't be unloaded.
you'd create them with cc -dynamiclib -o mydylib.dylib a.o b.o
.so's are bundles, and basically shared object files which can be loaded
multiple times as well as unloaded.
you'd use the -bundle option to create them.
i wrote some code to use cf plugin services with libao to load the
macosx driver. cf plugin services is just a highlevel wrapper for
creating bundles.
anyway, i have that part of the code working, the mac os x driver loads
fine, but the core audio code doesn't seem to be working. it was
crashing iirc, when i ran some of the tests.
anyway, i haven't had a chance to look closely at that, and i need to
familiarize myself with core audio before i could become very useful
here.
i have my version of libao on my idisk, which uses cf to load the
plugins. there's a small bit of documentation as well.
--- >8 ----
List archives: http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body. No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.
More information about the Vorbis-dev
mailing list