summaryrefslogtreecommitdiff
path: root/apps/codecs/libspeex/bits.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-11-18 17:12:19 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-11-18 17:12:19 +0000
commit99617d71bad0e5870a38e37c8654e46868e2a5ba (patch)
treee0ecc3b73e8e167c7f5bf00a6c88b83c1119aea3 /apps/codecs/libspeex/bits.c
parent75432619e8be2f22f86ed0869d46bf7245c7c14d (diff)
downloadrockbox-99617d71bad0e5870a38e37c8654e46868e2a5ba.zip
rockbox-99617d71bad0e5870a38e37c8654e46868e2a5ba.tar.gz
rockbox-99617d71bad0e5870a38e37c8654e46868e2a5ba.tar.bz2
rockbox-99617d71bad0e5870a38e37c8654e46868e2a5ba.tar.xz
Make speex the new voice format for SWCODEC targets (non-Archos). Remove codec swapping and build speex voice decoding directly into the core binary.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15668 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/libspeex/bits.c')
-rw-r--r--apps/codecs/libspeex/bits.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/apps/codecs/libspeex/bits.c b/apps/codecs/libspeex/bits.c
index e460a39..4629012 100644
--- a/apps/codecs/libspeex/bits.c
+++ b/apps/codecs/libspeex/bits.c
@@ -45,6 +45,7 @@
#define MAX_CHARS_PER_FRAME (2000/BYTES_PER_CHAR)
#endif
+#ifndef ROCKBOX_VOICE_CODEC
void speex_bits_init(SpeexBits *bits)
{
bits->chars = (char*)speex_alloc(MAX_CHARS_PER_FRAME);
@@ -57,6 +58,7 @@ void speex_bits_init(SpeexBits *bits)
speex_bits_reset(bits);
}
+#endif
void speex_bits_init_buffer(SpeexBits *bits, void *buff, int buf_size)
{
@@ -82,12 +84,14 @@ void speex_bits_set_bit_buffer(SpeexBits *bits, void *buff, int buf_size)
}
+#ifndef ROCKBOX_VOICE_CODEC
void speex_bits_destroy(SpeexBits *bits)
{
if (bits->owner)
speex_free(bits->chars);
/* Will do something once the allocation is dynamic */
}
+#endif
void speex_bits_reset(SpeexBits *bits)
{
@@ -106,7 +110,7 @@ void speex_bits_rewind(SpeexBits *bits)
bits->overflow=0;
}
-#ifndef SPEEX_VOICE_ENCODER
+#if !defined(SPEEX_VOICE_ENCODER) && !defined(ROCKBOX_VOICE_CODEC)
void speex_bits_read_from(SpeexBits *bits, char *chars, int len)
{
int i;