Mercurial > audlegacy
annotate Plugins/Input/mpg123/mpg123.h @ 1117:38ff0b6b019b trunk
[svn] - fix an oops
author | nenolod |
---|---|
date | Tue, 30 May 2006 22:34:42 -0700 |
parents | b5ae09a6c2f1 |
children | 47a8833c2b01 |
rev | line source |
---|---|
61 | 1 /* |
2 * mpg123 defines | |
3 * used source: musicout.h from mpegaudio package | |
4 */ | |
5 | |
6 #ifndef __MPG123_H__ | |
7 #define __MPG123_H__ | |
8 | |
9 #ifdef HAVE_CONFIG_H | |
10 # include "config.h" | |
11 #endif | |
12 | |
13 #include <glib.h> | |
957
12f57026da8f
[svn] First attempt at introducing taglib here. Very rough, needs polishing. Please wear protective goggles before opening the file dialog. It *will* explode.
chainsaw
parents:
701
diff
changeset
|
14 #include <tag_c.h> |
61 | 15 |
970
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
16 #ifdef INTEGER_COMPILE |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
17 |
1089
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
18 typedef long mpgdec_real; |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
19 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
20 # define REAL_RADIX 15 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
21 # define REAL_FACTOR (32.0 * 1024.0) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
22 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
23 # define REAL_PLUS_32767 ( 32767 << REAL_RADIX ) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
24 # define REAL_MINUS_32768 ( -32768 << REAL_RADIX ) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
25 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
26 # define DOUBLE_TO_REAL(x) ((int)((x) * REAL_FACTOR)) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
27 # define REAL_TO_SHORT(x) ((x) >> REAL_RADIX) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
28 # define REAL_MUL(x, y) (((long long)(x) * (long long)(y)) >> REAL_RADIX) |
970
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
29 |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
30 #else |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
31 |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
32 typedef float mpgdec_real; |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
33 |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
34 #endif |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
35 |
1089
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
36 #ifndef DOUBLE_TO_REAL |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
37 # define DOUBLE_TO_REAL(x) (x) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
38 #endif |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
39 #ifndef REAL_TO_SHORT |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
40 # define REAL_TO_SHORT(x) (x) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
41 #endif |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
42 #ifndef REAL_PLUS_32767 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
43 # define REAL_PLUS_32767 32767.0 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
44 #endif |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
45 #ifndef REAL_MINUS_32768 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
46 # define REAL_MINUS_32768 -32768.0 |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
47 #endif |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
48 #ifndef REAL_MUL |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
49 # define REAL_MUL(x, y) ((x) * (y)) |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
50 #endif |
e75c7856fbea
[svn] - when using fixed integer based compile -DINTEGER_COMPILE, we want to use long type, not int (also use radixes to emulate FPU math)
nenolod
parents:
971
diff
changeset
|
51 |
61 | 52 enum { |
53 SYNTH_AUTO, | |
54 SYNTH_FPU, | |
55 SYNTH_3DNOW, | |
56 SYNTH_MMX, | |
57 }; | |
58 | |
59 enum { | |
60 DETECT_EXTENSION, | |
61 DETECT_CONTENT, | |
62 DETECT_BOTH | |
63 }; | |
64 | |
65 #include <gtk/gtk.h> | |
66 | |
67 #include "audacious/plugin.h" | |
68 #include "dxhead.h" | |
69 #include "xmms-id3.h" | |
70 | |
71 #define SBLIMIT 32 | |
72 #define SCALE_BLOCK 12 | |
73 #define SSLIMIT 18 | |
74 | |
75 #define MPG_MD_STEREO 0 | |
76 #define MPG_MD_JOINT_STEREO 1 | |
77 #define MPG_MD_DUAL_CHANNEL 2 | |
78 #define MPG_MD_MONO 3 | |
79 | |
80 #define ENCODING_SEPARATOR " ,:;|/" | |
81 | |
127
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
82 #define MAXFRAMESIZE 4096 |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
83 |
61 | 84 struct id3v1tag_t { |
85 char tag[3]; /* always "TAG": defines ID3v1 tag 128 bytes before EOF */ | |
86 char title[30]; | |
87 char artist[30]; | |
88 char album[30]; | |
89 char year[4]; | |
90 union { | |
91 struct { | |
92 char comment[30]; | |
93 } v1_0; | |
94 struct { | |
95 char comment[28]; | |
96 char __zero; | |
97 unsigned char track_number; | |
98 } v1_1; | |
99 } u; | |
100 unsigned char genre; | |
101 }; | |
102 | |
103 struct id3tag_t { | |
104 char title[64]; | |
105 char artist[64]; | |
106 char album[64]; | |
107 char comment[256]; | |
108 char genre[256]; | |
109 gint year; | |
110 gint track_number; | |
111 }; | |
112 | |
113 typedef struct { | |
114 int going, num_frames, eof, jump_to_time, eq_active; | |
115 int songtime; | |
116 double tpf; | |
117 float eq_mul[576]; | |
118 gboolean output_audio, first_frame, network_stream; | |
119 guint32 filesize; /* Filesize without junk */ | |
120 } PlayerInfo; | |
121 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
122 void mpgdec_set_eq(int on, float preamp, float *band); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
123 void mpgdec_file_info_box(char *); |
61 | 124 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
125 extern PlayerInfo *mpgdec_info; |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
126 extern InputPlugin mpgdec_ip; |
61 | 127 |
128 struct al_table { | |
129 short bits; | |
130 short d; | |
131 }; | |
132 | |
133 struct frame { | |
134 struct al_table *alloc; | |
970
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
135 int (*synth) (mpgdec_real *, int, unsigned char *, int *); |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
136 int (*synth_mono) (mpgdec_real *, unsigned char *, int *); |
61 | 137 int stereo; |
138 int jsbound; | |
139 int single; | |
140 int II_sblimit; | |
141 int down_sample_sblimit; | |
142 int lsf; | |
143 int mpeg25; | |
144 int down_sample; | |
145 int header_change; | |
146 int lay; | |
147 int (*do_layer) (struct frame * fr); | |
148 int error_protection; | |
149 int bitrate_index; | |
150 int sampling_frequency; | |
151 int padding; | |
152 int extension; | |
153 int mode; | |
154 int mode_ext; | |
155 int copyright; | |
156 int original; | |
157 int emphasis; | |
158 int framesize; /* computed framesize */ | |
159 int synth_type; | |
160 }; | |
161 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
162 void mpgdec_configure(void); |
61 | 163 |
164 typedef struct { | |
165 gint resolution; | |
166 gint channels; | |
167 gint downsample; | |
168 gint http_buffer_size; | |
169 gint http_prebuffer; | |
170 gboolean use_proxy; | |
171 gchar *proxy_host; | |
172 gint proxy_port; | |
173 gboolean proxy_use_auth; | |
174 gchar *proxy_user, *proxy_pass; | |
175 gboolean save_http_stream; | |
176 gchar *save_http_path; | |
177 gboolean use_udp_channel; | |
178 gchar *id3_format; | |
179 gboolean title_override, disable_id3v2; | |
180 gboolean title_encoding_enabled; | |
181 gchar *title_encoding; | |
182 int detect_by; | |
183 int default_synth; | |
184 } MPG123Config; | |
185 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
186 extern MPG123Config mpgdec_cfg; |
61 | 187 |
1091 | 188 struct mpgdec_instance { |
189 void (*dump_audio)(struct frame *fr); | |
190 }; | |
191 | |
61 | 192 struct bitstream_info { |
193 int bitindex; | |
194 unsigned char *wordpointer; | |
195 }; | |
196 | |
197 extern struct bitstream_info bsi; | |
198 | |
1091 | 199 typedef struct mpgdec_instance mpgdec_t; |
200 | |
127
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
201 struct mpstr { |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
202 int bsize; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
203 int framesize; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
204 int fsizeold; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
205 struct frame fr; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
206 /* int (*do_layer)(struct mpstr *,struct frame *fr,int,struct audio_info_struct *); */ |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
207 unsigned char bsspace[2][MAXFRAMESIZE+512]; /* MAXFRAMESIZE */ |
970
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
208 mpgdec_real hybrid_block[2][2][SBLIMIT*SSLIMIT]; |
127
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
209 int hybrid_blc[2]; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
210 unsigned long header; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
211 int bsnum; |
970
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
212 mpgdec_real synth_buffs[2][2][0x110]; |
127
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
213 int synth_bo; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
214 |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
215 struct bitstream_info bsi; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
216 }; |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
217 |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
218 |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
219 #define AUSHIFT 3 |
05d824e30afd
[svn] Synchronize mpg123 code with mpg123-0.59s.mc3. This brings us superior accuracy to libMAD, apparently.
nenolod
parents:
61
diff
changeset
|
220 |
61 | 221 /* ------ Declarations from "http.c" ------ */ |
222 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
223 extern int mpgdec_http_open(char *url); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
224 int mpgdec_http_read(gpointer data, gsize length); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
225 void mpgdec_http_close(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
226 char *mpgdec_http_get_title(char *url); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
227 int mpgdec_http_get_length(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
228 void mpgdec_http_seek(long pos); |
61 | 229 |
230 /* ------ Declarations from "common.c" ------ */ | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
231 extern unsigned int mpgdec_get1bit(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
232 extern unsigned int mpgdec_getbits(int); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
233 extern unsigned int mpgdec_getbits_fast(int); |
61 | 234 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
235 extern void mpgdec_open_stream(char *bs_filenam, int fd); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
236 extern int mpgdec_head_check(unsigned long); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
237 extern void mpgdec_stream_close(void); |
61 | 238 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
239 extern void mpgdec_set_pointer(long); |
61 | 240 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
241 extern unsigned char *mpgdec_pcm_sample; |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
242 extern int mpgdec_pcm_point; |
61 | 243 |
244 struct gr_info_s { | |
245 int scfsi; | |
246 unsigned part2_3_length; | |
247 unsigned big_values; | |
248 unsigned scalefac_compress; | |
249 unsigned block_type; | |
250 unsigned mixed_block_flag; | |
251 unsigned table_select[3]; | |
252 unsigned subblock_gain[3]; | |
253 unsigned maxband[3]; | |
254 unsigned maxbandl; | |
255 unsigned maxb; | |
256 unsigned region1start; | |
257 unsigned region2start; | |
258 unsigned preflag; | |
259 unsigned scalefac_scale; | |
260 unsigned count1table_select; | |
970
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
261 mpgdec_real *full_gain[3]; |
0f294f2b0a9b
[svn] - integer-mode decoding accuracy improvements
nenolod
parents:
957
diff
changeset
|
262 mpgdec_real *pow2gain; |
61 | 263 }; |
264 | |
265 struct III_sideinfo { | |
266 unsigned main_data_begin; | |
267 unsigned private_bits; | |
268 struct { | |
269 struct gr_info_s gr[2]; | |
270 } ch[2]; | |
271 }; | |
272 | |
273 extern void open_stream(char *, int fd); | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
274 extern long mpgdec_tell_stream(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
275 extern void mpgdec_read_frame_init(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
276 extern int mpgdec_read_frame(struct frame *fr); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
277 extern int mpgdec_back_frame(struct frame *fr, int num); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
278 int mpgdec_stream_jump_to_frame(struct frame *fr, int frame); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
279 int mpgdec_stream_jump_to_byte(struct frame *fr, int byte); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
280 int mpgdec_stream_check_for_xing_header(struct frame *fr, |
61 | 281 xing_header_t * xhead); |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
282 int mpgdec_calc_numframes(struct frame *fr); |
61 | 283 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
284 extern int mpgdec_do_layer3(struct frame *fr); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
285 extern int mpgdec_do_layer2(struct frame *fr); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
286 extern int mpgdec_do_layer1(struct frame *fr); |
61 | 287 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
288 extern int mpgdec_synth_1to1(mpgdec_real *, int, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
289 extern int mpgdec_synth_1to1_8bit(mpgdec_real *, int, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
290 extern int mpgdec_synth_1to1_mono(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
291 extern int mpgdec_synth_1to1_mono2stereo(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
292 extern int mpgdec_synth_1to1_8bit_mono(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
293 extern int mpgdec_synth_1to1_8bit_mono2stereo(mpgdec_real *, unsigned char *, |
61 | 294 int *); |
295 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
296 extern int mpgdec_synth_2to1(mpgdec_real *, int, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
297 extern int mpgdec_synth_2to1_8bit(mpgdec_real *, int, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
298 extern int mpgdec_synth_2to1_mono(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
299 extern int mpgdec_synth_2to1_mono2stereo(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
300 extern int mpgdec_synth_2to1_8bit_mono(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
301 extern int mpgdec_synth_2to1_8bit_mono2stereo(mpgdec_real *, unsigned char *, |
61 | 302 int *); |
303 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
304 extern int mpgdec_synth_4to1(mpgdec_real *, int, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
305 extern int mpgdec_synth_4to1_8bit(mpgdec_real *, int, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
306 extern int mpgdec_synth_4to1_mono(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
307 extern int mpgdec_synth_4to1_mono2stereo(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
308 extern int mpgdec_synth_4to1_8bit_mono(mpgdec_real *, unsigned char *, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
309 extern int mpgdec_synth_4to1_8bit_mono2stereo(mpgdec_real *, unsigned char *, |
61 | 310 int *); |
311 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
312 extern void mpgdec_rewindNbits(int bits); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
313 extern int mpgdec_hsstell(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
314 extern void mpgdec_set_pointer(long); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
315 extern void mpgdec_huffman_decoder(int, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
316 extern void mpgdec_huffman_count1(int, int *); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
317 extern int mpgdec_get_songlen(struct frame *fr, int no); |
61 | 318 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
319 #define mpgdec_getcpuflags(a, b) \ |
61 | 320 do { \ |
321 *(a) = 0; \ | |
322 *(b) = 0; \ | |
323 } while (0) | |
324 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
325 void mpgdec_init_layer3(int); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
326 void mpgdec_init_layer2(gboolean); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
327 void mpgdec_make_decode_tables(long scaleval); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
328 void mpgdec_make_conv16to8_table(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
329 void mpgdec_dct64(mpgdec_real *, mpgdec_real *, mpgdec_real *); |
61 | 330 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
331 int mpgdec_decode_header(struct frame *fr, unsigned long newhead); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
332 double mpgdec_compute_bpf(struct frame *fr); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
333 double mpgdec_compute_tpf(struct frame *fr); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
334 guint mpgdec_strip_spaces(char *src, size_t n); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
335 gchar *mpgdec_format_song_title(TagLib_Tag *taglib_tag, gchar * filename); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
336 double mpgdec_relative_pos(void); |
61 | 337 |
338 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
339 extern gchar ** mpgdec_id3_encoding_list; |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
340 extern unsigned char *mpgdec_conv16to8; |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
341 extern const int mpgdec_freqs[9]; |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
342 extern mpgdec_real mpgdec_muls[27][64]; |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
343 extern mpgdec_real mpgdec_decwin[512 + 32]; |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
344 extern mpgdec_real *mpgdec_pnts[5]; |
61 | 345 |
346 #define GENRE_MAX 0x94 | |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
347 extern const char *mpgdec_id3_genres[GENRE_MAX]; |
61 | 348 extern const int tabsel_123[2][3][16]; |
349 | |
1090
09eb2c83097a
[svn] Psychoaccoustics support (to disable, temporarily add -UPSYCHO to your CFLAGS.):
nenolod
parents:
1089
diff
changeset
|
350 /* psycho.c defines */ |
09eb2c83097a
[svn] Psychoaccoustics support (to disable, temporarily add -UPSYCHO to your CFLAGS.):
nenolod
parents:
1089
diff
changeset
|
351 void psycho_init(void); |
09eb2c83097a
[svn] Psychoaccoustics support (to disable, temporarily add -UPSYCHO to your CFLAGS.):
nenolod
parents:
1089
diff
changeset
|
352 int psycho_process(void *data, int length, int nch); |
09eb2c83097a
[svn] Psychoaccoustics support (to disable, temporarily add -UPSYCHO to your CFLAGS.):
nenolod
parents:
1089
diff
changeset
|
353 |
1098
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
354 /* interface.c */ |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
355 mpgdec_t *mpgdec_new(void); |
b5ae09a6c2f1
[svn] - prepare to split audacious code away from the actual decoder and use a highlevel API
nenolod
parents:
1091
diff
changeset
|
356 |
61 | 357 #endif |