diff options
author | conrad <conrad@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2004-07-21 10:34:37 +0400 |
---|---|---|
committer | conrad <conrad@0101bb08-14d6-0310-b084-bc0e0c8e3800> | 2004-07-21 10:34:37 +0400 |
commit | 54dd86da13da16b82a23549eb7c78351abb35c48 (patch) | |
tree | 519e25c145f20580b4053f07198772f1e37d4f65 /src | |
parent | 3489dcd904e0f225bb877435cdbda4b2116f304a (diff) |
add noglobals API support to speexdec.c
git-svn-id: http://svn.xiph.org/trunk/speex@7208 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'src')
-rw-r--r-- | src/speexdec.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/speexdec.c b/src/speexdec.c index 479070a..f0a8982 100644 --- a/src/speexdec.c +++ b/src/speexdec.c @@ -86,6 +86,10 @@ #include <speex/speex_callbacks.h> #include "misc.h" +#ifdef DISABLE_GLOBAL_POINTERS +#include <speex/speex_noglobals.h> +#endif + #define MAX_FRAME_SIZE 2000 #define readint(buf, base) (((buf[base+3]<<24)&0xff000000)| \ @@ -323,7 +327,12 @@ static void *process_header(ogg_packet *op, int enh_enabled, int *frame_size, in modeID = header->mode; if (forceMode!=-1) modeID = forceMode; + +#ifdef DISABLE_GLOBAL_POINTERS + mode = speex_mode_new (modeID); +#else mode = speex_mode_list[modeID]; +#endif if (header->speex_version_id > 1) { |