-
Notifications
You must be signed in to change notification settings - Fork 2
/
mpg123.h
90 lines (69 loc) · 2.35 KB
/
mpg123.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#ifndef HAD_MPG123_H
#define HAD_MPG123_H
/*
mpg123.h -- mpeg structure definitions and parsing function prototypes
Copyright (C) 1995,1996,1997 by Michael Hipp.
Changes Copyright (C) 2000 Dieter Baron
The routines in this file were taken from xmms's mpg123 lib, adapted
for use in malint by Dieter Baron.
The original author can be contacted at <[email protected]>
This file is part of malint, an MPEG Audio stream validator.
The author can be contacted at <[email protected]>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
struct gr_info_s
{
int scfsi;
unsigned part2_3_length;
unsigned big_values;
unsigned scalefac_compress;
unsigned block_type;
unsigned mixed_block_flag;
unsigned table_select[3];
unsigned subblock_gain[3];
unsigned maxband[3];
unsigned maxbandl;
unsigned maxb;
unsigned region1start;
unsigned region2start;
unsigned preflag;
unsigned scalefac_scale;
unsigned count1table_select;
#if 0
real *full_gain[3];
real *pow2gain;
#endif
};
struct sideinfo
{
unsigned main_data_begin;
unsigned private_bits;
struct
{
struct gr_info_s gr[2];
}
ch[2];
};
extern int bitindex;
extern unsigned char *wordpointer;
int I_get_bit_alloc(unsigned long h, int *balloc);
short III_get_side_info_1(struct sideinfo *si, int stereo,
int ms_stereo, long sfreq, int single);
short III_get_side_info_2(struct sideinfo *si, int stereo,
int ms_stereo, long sfreq, int single);
int III_get_scale_factors_1(int *scf, struct gr_info_s *gr_info);
int III_get_scale_factors_2(int *scf, struct gr_info_s *gr_info, int i_stereo);
unsigned int mpg123_getbits(int number_of_bits);
unsigned int mpg123_getbits_fast(int number_of_bits);
unsigned int mpg123_get1bit(void);
#endif /* mpg123.h */