summaryrefslogtreecommitdiffstats
path: root/apps/codecs/libspeex/nb_celp.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2007-11-01 21:30:51 +0000
committerThom Johansen <thomj@rockbox.org>2007-11-01 21:30:51 +0000
commitbf1b7f131c933b83afe62f01c200366e4e2e37f3 (patch)
treea9ab90e6a01df357b7a8649d8e626a47e1678f64 /apps/codecs/libspeex/nb_celp.c
parent6d88717f6949587908ec08affa07d06239c3bae1 (diff)
downloadrockbox-bf1b7f131c933b83afe62f01c200366e4e2e37f3.tar.gz
rockbox-bf1b7f131c933b83afe62f01c200366e4e2e37f3.zip
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
Diffstat (limited to 'apps/codecs/libspeex/nb_celp.c')
-rw-r--r--apps/codecs/libspeex/nb_celp.c23
1 files changed, 3 insertions, 20 deletions
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)