From bf1b7f131c933b83afe62f01c200366e4e2e37f3 Mon Sep 17 00:00:00 2001 From: Thom Johansen Date: Thu, 1 Nov 2007 21:30:51 +0000 Subject: First attempt at ifdeffing out as much of the encoder stuff as possible from Speex. Gives a smaller binary and allows me to remove a couple more files from SOURCES. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15394 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libspeex/nb_celp.c | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'apps/codecs/libspeex/nb_celp.c') diff --git a/apps/codecs/libspeex/nb_celp.c b/apps/codecs/libspeex/nb_celp.c index aab0b722dc..50e1b11372 100644 --- a/apps/codecs/libspeex/nb_celp.c +++ b/apps/codecs/libspeex/nb_celp.c @@ -109,8 +109,8 @@ const float exc_gain_quant_scal1[2]={0.70469f, 1.05127f}; #define sqr(x) ((x)*(x)) extern const spx_word16_t lpc_window[]; -#if 0 -void *nb_encoder_init(const speexmode *m) +#ifndef SPEEX_DISABLE_ENCODER +void *nb_encoder_init(const SpeexMode *m) { EncState *st; const SpeexNBMode *mode; @@ -1024,18 +1024,6 @@ int nb_encode(void *state, void *vin, SpeexBits *bits) return 1; } -#else -void *nb_encoder_init(const SpeexMode *m) -{ - return NULL; -} -void nb_encoder_destroy(void *state) -{ -} -int nb_encode(void *state, void *vin, SpeexBits *bits) -{ - return 1; -} #endif static DecState global_decstate IBSS_ATTR; @@ -1763,7 +1751,7 @@ int nb_decode(void *state, SpeexBits *bits, void *vout) return 0; } -#if 0 +#ifndef SPEEX_DISABLE_ENCODER int nb_encoder_ctl(void *state, int request, void *ptr) { EncState *st; @@ -1959,11 +1947,6 @@ int nb_encoder_ctl(void *state, int request, void *ptr) } return 0; } -#else -int nb_encoder_ctl(void *state, int request, void *ptr) -{ - return 0; -} #endif int nb_decoder_ctl(void *state, int request, void *ptr) -- cgit v1.2.3