2 * Copyright (C) 1999-2010 The L.A.M.E. project
4 * Initially written by Michael Hipp, see also AUTHORS and README.
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
16 * You should have received a copy of the GNU Library General Public
17 * License along with this library; if not, write to the
18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
19 * Boston, MA 02111-1307, USA.
21 #ifndef MPG123_H_INCLUDED
22 #define MPG123_H_INCLUDED
31 # define strrchr rindex
33 char *strchr(), *strrchr();
35 # define memcpy(d, s, n) bcopy ((s), (d), (n))
36 # define memmove(d, s, n) bcopy ((s), (d), (n))
43 #if defined(__riscos__) && defined(FPA10)
50 #define M_PI 3.14159265358979323846
53 #define M_SQRT2 1.41421356237309504880
68 #elif defined(REAL_IS_LONG_DOUBLE)
69 # define real long double
80 #define MPG_MD_STEREO 0
81 #define MPG_MD_JOINT_STEREO 1
82 #define MPG_MD_DUAL_CHANNEL 2
85 #define MAXFRAMESIZE 2880
87 /* AF: ADDED FOR LAYER1/LAYER2 */
88 #define SCALE_BLOCK 12
91 /* Pre Shift fo 16 to 8 bit converter table */
96 int single; /* single channel (monophonic) */
97 int lsf; /* 0 = MPEG-1, 1 = MPEG-2/2.5 */
98 int mpeg25; /* 1 = MPEG-2.5, 0 = MPEG-1/2 */
101 int error_protection; /* 1 = CRC-16 code following header */
103 int sampling_frequency; /* sample rate of decompressed audio in Hz */
111 int framesize; /* computed framesize */
113 /* AF: ADDED FOR LAYER1/LAYER2 */
115 struct al_table2 const *alloc;
116 int down_sample_sblimit;
124 unsigned part2_3_length;
126 unsigned scalefac_compress;
128 unsigned mixed_block_flag;
129 unsigned table_select[3];
130 unsigned subblock_gain[3];
134 unsigned region1start;
135 unsigned region2start;
137 unsigned scalefac_scale;
138 unsigned count1table_select;
143 struct III_sideinfo {
144 unsigned main_data_begin;
145 unsigned private_bits;
147 struct gr_info_s gr[2];