diff options
Diffstat (limited to 'libspeex/speex.c')
-rw-r--r-- | libspeex/speex.c | 28 |
1 files changed, 5 insertions, 23 deletions
diff --git a/libspeex/speex.c b/libspeex/speex.c index 846e021..78e1a7a 100644 --- a/libspeex/speex.c +++ b/libspeex/speex.c @@ -38,6 +38,7 @@ #include "modes.h" #include <math.h> +#include "os_support.h" #ifndef NULL #define NULL 0 @@ -83,6 +84,7 @@ int speex_decode_native(void *state, SpeexBits *bits, spx_word16_t *out) #ifdef FIXED_POINT +#ifndef DISABLE_FLOAT_API int speex_encode(void *state, float *in, SpeexBits *bits) { int i; @@ -100,6 +102,7 @@ int speex_encode(void *state, float *in, SpeexBits *bits) } return (*((SpeexMode**)state))->enc(state, short_in, bits); } +#endif /* #ifndef DISABLE_FLOAT_API */ int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits) { @@ -108,6 +111,7 @@ int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits) return (mode)->enc(state, in, bits); } +#ifndef DISABLE_FLOAT_API int speex_decode(void *state, SpeexBits *bits, float *out) { int i, ret; @@ -119,6 +123,7 @@ int speex_decode(void *state, SpeexBits *bits, float *out) out[i] = short_out[i]; return ret; } +#endif /* #ifndef DISABLE_FLOAT_API */ int speex_decode_int(void *state, SpeexBits *bits, spx_int16_t *out) { @@ -208,29 +213,6 @@ int nb_mode_query(const void *mode, int request, void *ptr) return 0; } -int wb_mode_query(const void *mode, int request, void *ptr) -{ - const SpeexSBMode *m = (const SpeexSBMode*)mode; - - switch (request) - { - case SPEEX_MODE_FRAME_SIZE: - *((int*)ptr)=2*m->frameSize; - break; - case SPEEX_SUBMODE_BITS_PER_FRAME: - if (*((int*)ptr)==0) - *((int*)ptr) = SB_SUBMODE_BITS+1; - else if (m->submodes[*((int*)ptr)]==NULL) - *((int*)ptr) = -1; - else - *((int*)ptr) = m->submodes[*((int*)ptr)]->bits_per_frame; - break; - default: - speex_warning_int("Unknown wb_mode_query request: ", request); - return -1; - } - return 0; -} int speex_lib_ctl(int request, void *ptr) |