1
0
Fork 0
forked from len0rd/rockbox

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
This commit is contained in:
Michael Sevakis 2007-11-18 17:12:19 +00:00
parent 75432619e8
commit 99617d71ba
29 changed files with 753 additions and 1153 deletions

View file

@ -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;