1
0
Fork 0
forked from len0rd/rockbox

1) Always enable the DSP. 2) Change codec to output one 32-bit array per channel containing samples left-shifted to 28-bits (instead of 16-bit interleaved samples). 3) Remove the two 16KB internal predicterror_buffer arrays (we use the output arrays instead) 4) Small internal rearrangement of the code.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7667 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Dave Chapman 2005-10-28 00:11:28 +00:00
parent 7da9477bc3
commit f1844c4166
3 changed files with 420 additions and 411 deletions

View file

@ -1,6 +1,12 @@
#ifndef __ALAC__DECOMP_H
#define __ALAC__DECOMP_H
/* Always output samples shifted to 28 bits */
#define ALAC_OUTPUT_DEPTH 28
#define SCALE16 (ALAC_OUTPUT_DEPTH - 16)
#define ALAC_MAX_CHANNELS 2
#define ALAC_BLOCKSIZE 4096 /* Number of samples per channel per block */
typedef struct
{
unsigned char *input_buffer;
@ -26,10 +32,10 @@ typedef struct
} alac_file;
void create_alac(int samplesize, int numchannels, alac_file* alac);
int16_t* decode_frame(alac_file *alac,
unsigned char *inbuffer,
int *outputsize,
void (*yield)(void));
int alac_decode_frame(alac_file *alac,
unsigned char *inbuffer,
int32_t outputbuffer[ALAC_MAX_CHANNELS][ALAC_BLOCKSIZE],
void (*yield)(void));
void alac_set_info(alac_file *alac, char *inputbuffer);
#endif /* __ALAC__DECOMP_H */