forked from len0rd/rockbox
* Sync Speex codec with Speex SVN revision 12449 (roughly Speex 1.2beta1).
* Redo the changes required to make Speex compile in Rockbox. Should be a bit easier to keep in sync with Speex SVN now. * Fix name of Speex library in codecs Makefile. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12254 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
5158751263
commit
7bf62e8da6
70 changed files with 4847 additions and 3314 deletions
|
|
@ -37,7 +37,7 @@
|
|||
#endif
|
||||
|
||||
#include "modes.h"
|
||||
#include "math_approx.h"
|
||||
#include <math.h>
|
||||
|
||||
#ifndef NULL
|
||||
#define NULL 0
|
||||
|
|
@ -86,7 +86,7 @@ int speex_decode_native(void *state, SpeexBits *bits, spx_word16_t *out)
|
|||
int speex_encode(void *state, float *in, SpeexBits *bits)
|
||||
{
|
||||
int i;
|
||||
int N;
|
||||
spx_int32_t N;
|
||||
spx_int16_t short_in[MAX_IN_SAMPLES];
|
||||
speex_encoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
|
||||
for (i=0;i<N;i++)
|
||||
|
|
@ -111,7 +111,7 @@ int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits)
|
|||
int speex_decode(void *state, SpeexBits *bits, float *out)
|
||||
{
|
||||
int i, ret;
|
||||
int N;
|
||||
spx_int32_t N;
|
||||
spx_int16_t short_out[MAX_IN_SAMPLES];
|
||||
speex_decoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
|
||||
ret = (*((SpeexMode**)state))->dec(state, bits, short_out);
|
||||
|
|
@ -136,7 +136,7 @@ int speex_encode(void *state, float *in, SpeexBits *bits)
|
|||
int speex_encode_int(void *state, spx_int16_t *in, SpeexBits *bits)
|
||||
{
|
||||
int i;
|
||||
int N;
|
||||
spx_int32_t N;
|
||||
float float_in[MAX_IN_SAMPLES];
|
||||
speex_encoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
|
||||
for (i=0;i<N;i++)
|
||||
|
|
@ -152,7 +152,7 @@ int speex_decode(void *state, SpeexBits *bits, float *out)
|
|||
int speex_decode_int(void *state, SpeexBits *bits, spx_int16_t *out)
|
||||
{
|
||||
int i;
|
||||
int N;
|
||||
spx_int32_t N;
|
||||
float float_out[MAX_IN_SAMPLES];
|
||||
int ret;
|
||||
speex_decoder_ctl(state, SPEEX_GET_FRAME_SIZE, &N);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue