1 #ifndef _FLAC_DECODER_H
2 #define _FLAC_DECODER_H
6 #define MAX_CHANNELS 2 /* Maximum supported channels */
7 #define MAX_BLOCKSIZE 4608 /* Maxsize in samples of one uncompressed frame */
8 #define MAX_FRAMESIZE 32768 /* Maxsize in bytes of one compressed frame */
10 #define FLAC_OUTPUT_DEPTH 29 /* Provide samples left-shifted to 28 bits+sign */
12 enum decorrelation_type
{
19 typedef struct FLACContext
{
22 int min_blocksize
, max_blocksize
;
23 int min_framesize
, max_framesize
;
24 int samplerate
, channels
;
25 int blocksize
/*, last_blocksize*/;
27 unsigned long samplenumber
;
28 unsigned long totalsamples
;
29 enum decorrelation_type decorrelation
;
43 int flac_decode_frame(FLACContext
*s
,
46 uint8_t *buf
, int buf_size
,
47 void (*yield
)(void)) ICODE_ATTR_FLAC
;