[speex-dev] Re: does installed lib support _int()s ?
Ralph Giles
giles at xiph.org
Sun May 16 19:27:50 PDT 2004
On Sun, May 16, 2004 at 06:03:47PM -0400, Jean-Marc Valin wrote:
> Right now, I'm thinking of adding a speex_lib_ctl() call that would
> support SPEEX_GET_VERSION (and return a string) or
> SPEEX_GET_MAJOR_VERSION and SPEEX_GET_MINOR_VERSION (and return ints).
> I'm open to other suggestions though. If there's anything you'd like to
> see in the API for 1.2, say it now. ...and no, I won't add a
> speex_do_all_the_work_for_me() call :)
Sounds reasonable. You could also overload the existing speex_*_ctl() calls
to take SPEEX_GET_LIB_VERSION, SPEEX_GET_LIB_MAJOR_VERSION, etc.
What people are really asking for here is a way to determine at for conditional
compilation (i.e. at configure time) what calls are available. One traditional
way to do that is just to provide #defines for SPEEX_MAJOR_VERSION and so
on in the header. If you're using autoconf you can of course try to link with
one of the new functions, but just saying:
#include <speex.h>
#if defined(SPEEX_MINOR_VERSION) && (SPEEX_MINOR_VERSION > 0)
/* code that uses speex_decode_int(); */
#else
/* code that uses speex_decode(); */
#endif
is more portable. So it might be worth doing that as well.
FWIW,
-r
--- >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