[speex-dev] does installed lib support _int()s ?

Malcolm Baldridge speex at paypc.com
Sat May 15 19:06:35 PDT 2004



> Assuming one prefers to use the speex_encode_int() and
> speex_decode_int() when available, but fallback to speex_encode()
> and speex_decode() if an older version if the lib is installed,
> how does one best make the determination?

Well, for compile-time, I'd think that an #ifdef would do the trick.

The only way you could do it at RUNTIME is if you perform a dlopen() on the
speex library instead having it shared-linked, since the runtime ld.so will
fail to run your binary if it's linked against an old speex library without
the speex_XXXXX_int() symbols.  You'd open the .so file with RTLD_LAZY mode.

Of course, you'll need to figure out where the speex library is within your
program.  You'll be linking against libdl rather than libspeex, and
performing  a dlopen() and dlsym() for the various entry points.

You could always walk the /etc/ld.so.conf file for pathnames where to look
for the libspeex.so files.

=MB=

--- >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 'speex-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 Speex-dev mailing list