1
0
Fork 0
forked from len0rd/rockbox

Fix decoding of multichannel flac, refactor sample buffer handling and decorrelation (taken from ffmpeg sources) and add some flac details to the manual. Solves FS#12371.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31207 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Andree Buschmann 2011-12-10 22:28:16 +00:00
parent 09722dd28d
commit a6653a9bb6
4 changed files with 42 additions and 70 deletions

View file

@ -3,9 +3,9 @@
#include "bitstream.h"
#define MAX_CHANNELS 2 /* Maximum supported channels */
#define MAX_CHANNELS 6 /* Maximum supported channels, only left/right will be played back */
#define MAX_BLOCKSIZE 4608 /* Maxsize in samples of one uncompressed frame */
#define MAX_FRAMESIZE 32768 /* Maxsize in bytes of one compressed frame */
#define MAX_FRAMESIZE 65536 /* Maxsize in bytes of one compressed frame */
#define FLAC_OUTPUT_DEPTH 29 /* Provide samples left-shifted to 28 bits+sign */
@ -38,11 +38,11 @@ typedef struct FLACContext {
int sample_skip;
int framesize;
int32_t *decoded[MAX_CHANNELS];
} FLACContext;
int flac_decode_frame(FLACContext *s,
int32_t* decoded0,
int32_t* decoded1,
uint8_t *buf, int buf_size,
void (*yield)(void)) ICODE_ATTR_FLAC;