From a6653a9bb6c35e01dc44365b51f816198656acf7 Mon Sep 17 00:00:00 2001 From: Andree Buschmann Date: Sat, 10 Dec 2011 22:28:16 +0000 Subject: 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 --- apps/codecs/libffmpegFLAC/decoder.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'apps/codecs/libffmpegFLAC/decoder.h') diff --git a/apps/codecs/libffmpegFLAC/decoder.h b/apps/codecs/libffmpegFLAC/decoder.h index 0b148df..677a21a 100644 --- a/apps/codecs/libffmpegFLAC/decoder.h +++ b/apps/codecs/libffmpegFLAC/decoder.h @@ -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; -- cgit v1.1