diff options
author | Michael Sevakis <jethead71@rockbox.org> | 2007-11-18 17:12:19 +0000 |
---|---|---|
committer | Michael Sevakis <jethead71@rockbox.org> | 2007-11-18 17:12:19 +0000 |
commit | 99617d71bad0e5870a38e37c8654e46868e2a5ba (patch) | |
tree | e0ecc3b73e8e167c7f5bf00a6c88b83c1119aea3 /apps/codecs/libspeex | |
parent | 75432619e8be2f22f86ed0869d46bf7245c7c14d (diff) | |
download | rockbox-99617d71bad0e5870a38e37c8654e46868e2a5ba.tar.gz rockbox-99617d71bad0e5870a38e37c8654e46868e2a5ba.zip |
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')
-rw-r--r-- | apps/codecs/libspeex/bits.c | 6 | ||||
-rw-r--r-- | apps/codecs/libspeex/config-speex.h | 6 | ||||
-rw-r--r-- | apps/codecs/libspeex/exc_10_16_table.c | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/exc_10_32_table.c | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/exc_20_32_table.c | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/exc_5_256_table.c | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/exc_5_64_table.c | 2 | ||||
-rw-r--r-- | apps/codecs/libspeex/exc_8_128_table.c | 2 |
8 files changed, 17 insertions, 7 deletions
diff --git a/apps/codecs/libspeex/bits.c b/apps/codecs/libspeex/bits.c index e460a39cf2..4629012c57 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; diff --git a/apps/codecs/libspeex/config-speex.h b/apps/codecs/libspeex/config-speex.h index ad1393fc60..70d86f6299 100644 --- a/apps/codecs/libspeex/config-speex.h +++ b/apps/codecs/libspeex/config-speex.h @@ -45,6 +45,12 @@ #define FLOATING_POINT #endif +#ifndef ROCKBOX_VOICE_CODEC +#define EXC_ICONST_ATTR ICONST_ATTR +#else +#define EXC_ICONST_ATTR +#endif + /* Define to 1 if you have the <dlfcn.h> header file. */ /* #undef HAVE_DLFCN_H */ diff --git a/apps/codecs/libspeex/exc_10_16_table.c b/apps/codecs/libspeex/exc_10_16_table.c index 2184e9c955..755c5a0b7f 100644 --- a/apps/codecs/libspeex/exc_10_16_table.c +++ b/apps/codecs/libspeex/exc_10_16_table.c @@ -32,7 +32,7 @@ #include "config-speex.h" -const signed char exc_10_16_table[160] ICONST_ATTR = { +const signed char exc_10_16_table[160] EXC_ICONST_ATTR = { 22,39,14,44,11,35,-2,23,-4,6, 46,-28,13,-27,-23,12,4,20,-5,9, 37,-18,-23,23,0,9,-6,-20,4,-1, diff --git a/apps/codecs/libspeex/exc_10_32_table.c b/apps/codecs/libspeex/exc_10_32_table.c index ac8cda03c8..1c94b5511c 100644 --- a/apps/codecs/libspeex/exc_10_32_table.c +++ b/apps/codecs/libspeex/exc_10_32_table.c @@ -32,7 +32,7 @@ #include "config-speex.h" -const signed char exc_10_32_table[320] ICONST_ATTR = { +const signed char exc_10_32_table[320] EXC_ICONST_ATTR = { 7,17,17,27,25,22,12,4,-3,0, 28,-36,39,-24,-15,3,-9,15,-5,10, 31,-28,11,31,-21,9,-11,-11,-2,-7, diff --git a/apps/codecs/libspeex/exc_20_32_table.c b/apps/codecs/libspeex/exc_20_32_table.c index fff3bed944..40dbb34e9e 100644 --- a/apps/codecs/libspeex/exc_20_32_table.c +++ b/apps/codecs/libspeex/exc_20_32_table.c @@ -32,7 +32,7 @@ #include "config-speex.h" -const signed char exc_20_32_table[640] ICONST_ATTR = { +const signed char exc_20_32_table[640] EXC_ICONST_ATTR = { 12,32,25,46,36,33,9,14,-3,6,1,-8,0,-10,-5,-7,-7,-7,-5,-5, 31,-27,24,-32,-4,10,-11,21,-3,19,23,-9,22,24,-10,-1,-10,-13,-7,-11, 42,-33,31,19,-8,0,-10,-16,1,-21,-17,10,-8,14,8,4,11,-2,5,-2, diff --git a/apps/codecs/libspeex/exc_5_256_table.c b/apps/codecs/libspeex/exc_5_256_table.c index 6af987fea4..1a32057956 100644 --- a/apps/codecs/libspeex/exc_5_256_table.c +++ b/apps/codecs/libspeex/exc_5_256_table.c @@ -32,7 +32,7 @@ #include "config-speex.h" -const signed char exc_5_256_table[1280] ICONST_ATTR = { +const signed char exc_5_256_table[1280] EXC_ICONST_ATTR = { -8,-37,5,-43,5, 73,61,39,12,-3, -61,-32,2,42,30, diff --git a/apps/codecs/libspeex/exc_5_64_table.c b/apps/codecs/libspeex/exc_5_64_table.c index cd03eb5a20..7d29f60373 100644 --- a/apps/codecs/libspeex/exc_5_64_table.c +++ b/apps/codecs/libspeex/exc_5_64_table.c @@ -32,7 +32,7 @@ #include "config-speex.h" -const signed char exc_5_64_table[320] ICONST_ATTR = { +const signed char exc_5_64_table[320] EXC_ICONST_ATTR = { 1,5,-15,49,-66, -48,-4,50,-44,7, 37,16,-18,25,-26, diff --git a/apps/codecs/libspeex/exc_8_128_table.c b/apps/codecs/libspeex/exc_8_128_table.c index 3a910bee37..02a58e052c 100644 --- a/apps/codecs/libspeex/exc_8_128_table.c +++ b/apps/codecs/libspeex/exc_8_128_table.c @@ -32,7 +32,7 @@ #include "config-speex.h" -const signed char exc_8_128_table[1024] ICONST_ATTR = { +const signed char exc_8_128_table[1024] EXC_ICONST_ATTR = { -14,9,13,-32,2,-10,31,-10, -8,-8,6,-4,-1,10,-64,23, 6,20,13,6,8,-22,16,34, |