Debian Codegraph @

external/mp3/mad_stream.h

raw symbols SCIP
1 /*
2 * libmad - MPEG audio decoder library
3 * Copyright (C) 2000-2004 Underbit Technologies, Inc.
4 *
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
9 *
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * $Id: stream.h,v 1.20 2004/02/05 09:02:39 rob Exp $
20 */
21
22 # ifndef LIBMAD_STREAM_H
23 # define LIBMAD_STREAM_Hcxx . . $ `external/mp3/mad_stream.h:23:10`!
24
25 # include "mad_bit.h"cxx . . $ `<file>/external/mp3/mad_bit.h`/
26
27 # define MAD_BUFFER_GUARDcxx . . $ `external/mp3/mad_stream.h:27:10`! 8
28 # define MAD_BUFFER_MDLENcxx . . $ `external/mp3/mad_stream.h:28:10`! (511 + 2048 + MAD_BUFFER_GUARDcxx . . $ `external/mp3/mad_stream.h:27:10`!)
29
30 enum mad_errorcxx . . $ mad_error# {
31 MAD_ERROR_NONEcxx . . $ MAD_ERROR_NONE. = 0x0000, /* no error */
32
33 MAD_ERROR_BUFLENcxx . . $ MAD_ERROR_BUFLEN. = 0x0001, /* input buffer too small (or EOF) */
34 MAD_ERROR_BUFPTRcxx . . $ MAD_ERROR_BUFPTR. = 0x0002, /* invalid (null) buffer pointer */
35
36 MAD_ERROR_NOMEMcxx . . $ MAD_ERROR_NOMEM. = 0x0031, /* not enough memory */
37
38 MAD_ERROR_LOSTSYNCcxx . . $ MAD_ERROR_LOSTSYNC. = 0x0101, /* lost synchronization */
39 MAD_ERROR_BADLAYERcxx . . $ MAD_ERROR_BADLAYER. = 0x0102, /* reserved header layer value */
40 MAD_ERROR_BADBITRATEcxx . . $ MAD_ERROR_BADBITRATE. = 0x0103, /* forbidden bitrate value */
41 MAD_ERROR_BADSAMPLERATEcxx . . $ MAD_ERROR_BADSAMPLERATE. = 0x0104, /* reserved sample frequency value */
42 MAD_ERROR_BADEMPHASIScxx . . $ MAD_ERROR_BADEMPHASIS. = 0x0105, /* reserved emphasis value */
43
44 MAD_ERROR_BADCRCcxx . . $ MAD_ERROR_BADCRC. = 0x0201, /* CRC check failed */
45 MAD_ERROR_BADBITALLOCcxx . . $ MAD_ERROR_BADBITALLOC. = 0x0211, /* forbidden bit allocation value */
46 MAD_ERROR_BADSCALEFACTORcxx . . $ MAD_ERROR_BADSCALEFACTOR. = 0x0221, /* bad scalefactor index */
47 MAD_ERROR_BADMODEcxx . . $ MAD_ERROR_BADMODE. = 0x0222, /* bad bitrate/mode combination */
48 MAD_ERROR_BADFRAMELENcxx . . $ MAD_ERROR_BADFRAMELEN. = 0x0231, /* bad frame length */
49 MAD_ERROR_BADBIGVALUEScxx . . $ MAD_ERROR_BADBIGVALUES. = 0x0232, /* bad big_values count */
50 MAD_ERROR_BADBLOCKTYPEcxx . . $ MAD_ERROR_BADBLOCKTYPE. = 0x0233, /* reserved block_type */
51 MAD_ERROR_BADSCFSIcxx . . $ MAD_ERROR_BADSCFSI. = 0x0234, /* bad scalefactor selection info */
52 MAD_ERROR_BADDATAPTRcxx . . $ MAD_ERROR_BADDATAPTR. = 0x0235, /* bad main_data_begin pointer */
53 MAD_ERROR_BADPART3LENcxx . . $ MAD_ERROR_BADPART3LEN. = 0x0236, /* bad audio data length */
54 MAD_ERROR_BADHUFFTABLEcxx . . $ MAD_ERROR_BADHUFFTABLE. = 0x0237, /* bad Huffman table select */
55 MAD_ERROR_BADHUFFDATAcxx . . $ MAD_ERROR_BADHUFFDATA. = 0x0238, /* Huffman data overrun */
56 MAD_ERROR_BADSTEREOcxx . . $ MAD_ERROR_BADSTEREO. = 0x0239 /* incompatible block_type for JS */
57 };
58
59 # define MAD_RECOVERABLEcxx . . $ `external/mp3/mad_stream.h:59:10`!(error) ((error) & 0xff00)
60
61 struct mad_streamcxx . . $ mad_stream# {
62 unsigned char const *buffercxx . . $ mad_stream#buffer.; /* input bitstream buffer */
63 unsigned char const *bufendcxx . . $ mad_stream#bufend.; /* end of buffer */
64 unsigned long skiplencxx . . $ mad_stream#skiplen.; /* bytes to skip before next frame */
65
66 int synccxx . . $ mad_stream#sync.; /* stream sync found */
67 unsigned long freeratecxx . . $ mad_stream#freerate.; /* free bitrate (fixed) */
68
69 unsigned char const *this_framecxx . . $ mad_stream#this_frame.; /* start of current frame */
70 unsigned char const *next_framecxx . . $ mad_stream#next_frame.; /* start of next frame */
71 struct mad_bitptrcxx . . $ mad_bitptr# ptrcxx . . $ mad_stream#ptr.; /* current processing bit pointer */
72
73 struct mad_bitptrcxx . . $ mad_bitptr# anc_ptrcxx . . $ mad_stream#anc_ptr.; /* ancillary bits pointer */
74 unsigned int anc_bitlencxx . . $ mad_stream#anc_bitlen.; /* number of ancillary bits */
75
76 unsigned char (*main_datacxx . . $ mad_stream#main_data.)[MAD_BUFFER_MDLENcxx . . $ `external/mp3/mad_stream.h:28:10`!];
77 /* Layer III main_data() */
78 unsigned int md_lencxx . . $ mad_stream#md_len.; /* bytes in main_data */
79
80 int optionscxx . . $ mad_stream#options.; /* decoding options (see below) */
81 enum mad_errorcxx . . $ mad_error# errorcxx . . $ mad_stream#error.; /* error code (see above) */
82
83 /* Erez Volk 2007-05-30: */
84 unsigned long this_offsetcxx . . $ mad_stream#this_offset.; /* Offset in stream of current frame */
85 };
86
87 enumcxx . . $ $anonymous_type_71f699ba7988d5b0_0# {
88 MAD_OPTION_IGNORECRCcxx . . $ MAD_OPTION_IGNORECRC. = 0x0001, /* ignore CRC errors */
89 MAD_OPTION_HALFSAMPLERATEcxx . . $ MAD_OPTION_HALFSAMPLERATE. = 0x0002 /* generate PCM at 1/2 sample rate */
90 # if 0 /* not yet implemented */
91 MAD_OPTION_LEFTCHANNEL = 0x0010, /* decode left channel only */
92 MAD_OPTION_RIGHTCHANNEL = 0x0020, /* decode right channel only */
93 MAD_OPTION_SINGLECHANNEL = 0x0030 /* combine channels */
94 # endif
95 };
96
97 void mad_stream_initcxx . . $ mad_stream_init(16649f0d052e40ae).(struct mad_streamcxx . . $ mad_stream# *);
98 void mad_stream_finishcxx . . $ mad_stream_finish(16649f0d052e40ae).(struct mad_streamcxx . . $ mad_stream# *);
99
100 # define mad_stream_optionscxx . . $ `external/mp3/mad_stream.h:100:10`!(stream, opts) \
101 ((void) ((stream)->options = (opts)))
102
103 void mad_stream_buffercxx . . $ mad_stream_buffer(77a564b974a2c81b).(struct mad_streamcxx . . $ mad_stream# *,
104 unsigned char const *, unsigned long);
105 void mad_stream_skipcxx . . $ mad_stream_skip(a830e26bdf9f87a6).(struct mad_streamcxx . . $ mad_stream# *, unsigned long);
106
107 /* Erez Volk */
108 void mad_stream_buffer_offsetcxx . . $ mad_stream_buffer_offset(2a4dee137988d553).(struct mad_streamcxx . . $ mad_stream# *,
109 unsigned char const *, unsigned long,
110 unsigned long);
111
112 int mad_stream_synccxx . . $ mad_stream_sync(b074ad635480770e).(struct mad_streamcxx . . $ mad_stream# *);
113
114 char const *mad_stream_errorstrcxx . . $ mad_stream_errorstr(2140f2fa09604b4).(struct mad_streamcxx . . $ mad_stream# const *);
115
116 # endif