1#![allow(non_camel_case_types)]
6
7#[macro_use]
8extern crate bitflags;
9extern crate libc;
10
11use libc::{c_char, c_double, c_int, c_long, c_uchar, c_ulong, c_void, off_t, size_t, ssize_t};
12
13#[derive(Clone, Copy)]
14#[repr(C)]
15pub enum mpg123_channelcount {
16 MPG123_MONO = 1,
17 MPG123_STEREO = 2,
18}
19pub use mpg123_channelcount::*;
20
21bitflags! {
22 #[repr(C)]
23 pub struct mpg123_channels: c_int {
24 const MPG123_LEFT = 0x1;
25 const MPG123_RIGHT = 0x2;
26 const MPG123_LR = 0x3;
27 }
28}
29
30bitflags! {
31 #[repr(C)]
32 pub struct mpg123_enc_enum: c_int {
33 const MPG123_ENC_8 = 0x000f;
34 const MPG123_ENC_16 = 0x0040;
35 const MPG123_ENC_24 = 0x4000;
36 const MPG123_ENC_32 = 0x0100;
37 const MPG123_ENC_SIGNED = 0x0080;
38 const MPG123_ENC_FLOAT = 0x0e00;
39 const MPG123_ENC_SIGNED_16 = Self::MPG123_ENC_16.bits
40 | Self::MPG123_ENC_SIGNED.bits
41 | 0x0010;
42 const MPG123_ENC_UNSIGNED_16 = Self::MPG123_ENC_16.bits
43 | 0x0020;
44 const MPG123_ENC_UNSIGNED_8 = 0x0001;
45 const MPG123_ENC_SIGNED_8 = Self::MPG123_ENC_SIGNED.bits
46 | 0x0002;
47 const MPG123_ENC_ULAW_8 = 0x0004;
48 const MPG123_ENC_ALAW_8 = 0x0008;
49 const MPG123_ENC_SIGNED_32 = Self::MPG123_ENC_32.bits
50 | Self::MPG123_ENC_SIGNED.bits
51 | 0x1000;
52 const MPG123_ENC_UNSIGNED_32 = Self::MPG123_ENC_32.bits
53 | 0x2000;
54 const MPG123_ENC_SIGNED_24 = Self::MPG123_ENC_24.bits
55 | Self::MPG123_ENC_SIGNED.bits
56 | 0x1000;
57 const MPG123_ENC_UNSIGNED_24 = Self::MPG123_ENC_24.bits
58 | 0x2000;
59 const MPG123_ENC_FLOAT_32 = 0x0200;
60 const MPG123_ENC_FLOAT_64 = 0x0400;
61 const MPG123_ENC_ANY = Self::MPG123_ENC_SIGNED_8.bits
62 | Self::MPG123_ENC_SIGNED_16.bits
63 | Self::MPG123_ENC_SIGNED_24.bits
64 | Self::MPG123_ENC_SIGNED_32.bits
65 | Self::MPG123_ENC_UNSIGNED_8.bits
66 | Self::MPG123_ENC_UNSIGNED_16.bits
67 | Self::MPG123_ENC_UNSIGNED_24.bits
68 | Self::MPG123_ENC_UNSIGNED_32.bits
69 | Self::MPG123_ENC_ALAW_8.bits
70 | Self::MPG123_ENC_ULAW_8.bits
71 | Self::MPG123_ENC_FLOAT_32.bits
72 | Self::MPG123_ENC_FLOAT_64.bits;
73 }
74}
75
76#[derive(Clone, Copy)]
77#[repr(C)]
78pub enum mpg123_errors {
79 MPG123_DONE = -12,
80 MPG123_NEW_FORMAT = -11,
81 MPG123_NEED_MORE = -10,
82 MPG123_ERR = -1,
83 MPG123_OK = 0,
84 MPG123_BAD_OUTFORMAT,
85 MPG123_BAD_CHANNEL,
86 MPG123_BAD_RATE,
87 MPG123_ERR_16TO8TABLE,
88 MPG123_BAD_PARAM,
89 MPG123_BAD_BUFFER,
90 MPG123_OUT_OF_MEM,
91 MPG123_NOT_INITIALIZED,
92 MPG123_BAD_DECODER,
93 MPG123_BAD_HANDLE,
94 MPG123_NO_BUFFERS,
95 MPG123_BAD_RVA,
96 MPG123_NO_GAPLESS,
97 MPG123_NO_SPACE,
98 MPG123_BAD_TYPES,
99 MPG123_BAD_BAND,
100 MPG123_ERR_NULL,
101 MPG123_ERR_READER,
102 MPG123_NO_SEEK_FROM_END,
103 MPG123_BAD_WHENCE,
104 MPG123_NO_TIMEOUT,
105 MPG123_BAD_FILE,
106 MPG123_NO_SEEK,
107 MPG123_NO_READER,
108 MPG123_BAD_PARS,
109 MPG123_BAD_INDEX_PAR,
110 MPG123_OUT_OF_SYNC,
111 MPG123_RESYNC_FAIL,
112 MPG123_NO_8BIT,
113 MPG123_BAD_ALIGN,
114 MPG123_NULL_BUFFER,
115 MPG123_NO_RELSEEK,
116 MPG123_NULL_POINTER,
117 MPG123_BAD_KEY,
118 MPG123_NO_INDEX,
119 MPG123_INDEX_FAIL,
120 MPG123_BAD_DECODER_SETUP,
121 MPG123_MISSING_FEATURE,
122 MPG123_BAD_VALUE,
123 MPG123_LSEEK_FAILED,
124 MPG123_BAD_CUSTOM_IO,
125 MPG123_LFS_OVERFLOW,
126 MPG123_INT_OVERFLOW,
127}
128pub use mpg123_errors::*;
129
130#[derive(Clone, Copy)]
131#[repr(C)]
132pub enum mpg123_feature_set {
133 MPG123_FEATURE_ABI_UTF8OPEN = 0,
134 MPG123_FEATURE_OUTPUT_8BIT,
135 MPG123_FEATURE_OUTPUT_16BIT,
136 MPG123_FEATURE_OUTPUT_32BIT,
137 MPG123_FEATURE_INDEX,
138 MPG123_FEATURE_PARSE_ID3V2,
139 MPG123_FEATURE_DECODE_LAYER1,
140 MPG123_FEATURE_DECODE_LAYER2,
141 MPG123_FEATURE_DECODE_LAYER3,
142 MPG123_FEATURE_DECODE_ACCURATE,
143 MPG123_FEATURE_DECODE_DOWNSAMPLE,
144 MPG123_FEATURE_DECODE_NTOM,
145 MPG123_FEATURE_PARSE_ICY,
146 MPG123_FEATURE_TIMEOUT_READ,
147 MPG123_FEATURE_EQUALIZER,
148}
149pub use mpg123_feature_set::*;
150
151bitflags! {
152 #[repr(C)]
153 pub struct mpg123_flags: c_int {
154 const MPG123_CRC = 0x1;
155 const MPG123_COPYRIGHT = 0x2;
156 const MPG123_PRIVATE = 0x4;
157 const MPG123_ORIGINAL = 0x8;
158 }
159}
160
161#[derive(Clone, Copy)]
162#[repr(C)]
163pub struct mpg123_fmt {
164 pub rate: c_long,
165 pub channels: c_int,
166 pub encoding: c_int,
167}
168
169#[derive(Clone, Copy)]
170#[repr(C)]
171pub struct mpg123_frameinfo {
172 pub version: mpg123_version,
173 pub layer: c_int,
174 pub rate: c_long,
175 pub mode: mpg123_mode,
176 pub mode_ext: c_int,
177 pub framesize: c_int,
178 pub flags: mpg123_flags,
179 pub emphasis: c_int,
180 pub bitrate: c_int,
181 pub abr_rate: c_int,
182 pub vbr: mpg123_vbr,
183}
184
185pub enum mpg123_handle {}
186
187#[derive(Clone, Copy)]
188#[repr(C)]
189pub enum mpg123_id3_enc {
190 mpg123_id3_latin1 = 0,
191 mpg123_id3_utf16bom = 1,
192 mpg123_id3_utf16be = 2,
193 mpg123_id3_utf8 = 3,
194}
195pub use mpg123_id3_enc::*;
196
197#[derive(Clone, Copy)]
198#[repr(C)]
199pub enum mpg123_id3_pic_type {
200 mpg123_id3_pic_other = 0,
201 mpg123_id3_pic_icon = 1,
202 mpg123_id3_pic_other_icon = 2,
203 mpg123_id3_pic_front_cover = 3,
204 mpg123_id3_pic_back_cover = 4,
205 mpg123_id3_pic_leaflet = 5,
206 mpg123_id3_pic_media = 6,
207 mpg123_id3_pic_lead = 7,
208 mpg123_id3_pic_artist = 8,
209 mpg123_id3_pic_conductor = 9,
210 mpg123_id3_pic_orchestra = 10,
211 mpg123_id3_pic_composer = 11,
212 mpg123_id3_pic_lyricist = 12,
213 mpg123_id3_pic_location = 13,
214 mpg123_id3_pic_recording = 14,
215 mpg123_id3_pic_performance = 15,
216 mpg123_id3_pic_video = 16,
217 mpg123_id3_pic_fish = 17,
218 mpg123_id3_pic_illustration = 18,
219 mpg123_id3_pic_artist_logo = 19,
220 mpg123_id3_pic_publisher_logo = 20,
221}
222pub use mpg123_id3_pic_type::*;
223
224#[derive(Clone, Copy)]
225#[repr(C)]
226pub struct mpg123_id3v1 {
227 pub tag: [c_char; 3],
228 pub title: [c_char; 30],
229 pub artist: [c_char; 30],
230 pub album: [c_char; 30],
231 pub year: [c_char; 4],
232 pub comment: [c_char; 30],
233 pub genre: c_uchar,
234}
235
236#[derive(Clone, Copy)]
237#[repr(C)]
238pub struct mpg123_id3v2 {
239 pub version: c_uchar,
240 pub title: *mut mpg123_string,
241 pub artist: *mut mpg123_string,
242 pub album: *mut mpg123_string,
243 pub year: *mut mpg123_string,
244 pub genre: *mut mpg123_string,
245 pub comment: *mut mpg123_string,
246 pub comment_list: *mut mpg123_text,
247 pub comments: size_t,
248 pub text: *mut mpg123_text,
249 pub texts: size_t,
250 pub extra: *mut mpg123_text,
251 pub extras: size_t,
252 pub picture: *mut mpg123_picture,
253 pub pictures: size_t,
254}
255
256#[derive(Clone, Copy)]
257#[repr(C)]
258pub enum mpg123_mode {
259 MPG123_M_STEREO = 0,
260 MPG123_M_JOINT,
261 MPG123_M_DUAL,
262 MPG123_M_MONO,
263}
264pub use mpg123_mode::*;
265
266pub enum mpg123_pars {}
267
268#[derive(Clone, Copy)]
269#[repr(C)]
270pub enum mpg123_parms {
271 MPG123_VERBOSE = 0,
272 MPG123_FLAGS,
273 MPG123_ADD_FLAGS,
274 MPG123_FORCE_RATE,
275 MPG123_DOWN_SAMPLE,
276 MPG123_RVA,
277 MPG123_DOWNSPEED,
278 MPG123_UPSPEED,
279 MPG123_START_FRAME,
280 MPG123_DECODE_FRAMES,
281 MPG123_ICY_INTERVAL,
282 MPG123_OUTSCALE,
283 MPG123_TIMEOUT,
284 MPG123_REMOVE_FLAGS,
285 MPG123_RESYNC_LIMIT,
286 MPG123_INDEX_SIZE,
287 MPG123_PREFRAMES,
288 MPG123_FEEDPOOL,
289 MPG123_FEEDBUFFER,
290}
291pub use mpg123_parms::*;
292
293bitflags! {
294 #[repr(C)]
295 pub struct mpg123_param_flags: c_int {
296 const MPG123_FORCE_MONO = 0x00007;
297 const MPG123_MONO_LEFT = 0x00001;
298 const MPG123_MONO_RIGHT = 0x00002;
299 const MPG123_MONO_MIX = 0x00004;
300 const MPG123_FORCE_STEREO = 0x00008;
301 const MPG123_FORCE_8BIT = 0x00010;
302 const MPG123_QUIET = 0x00020;
303 const MPG123_GAPLESS = 0x00040;
304 const MPG123_NO_RESYNC = 0x00080;
305 const MPG123_SEEKBUFFER = 0x00100;
306 const MPG123_FUZZY = 0x00200;
307 const MPG123_FORCE_FLOAT = 0x00400;
308 const MPG123_PLAIN_ID3TEXT = 0x00800;
309 const MPG123_IGNORE_STREAMLENGTH = 0x01000;
310 const MPG123_SKIP_ID3V2 = 0x02000;
311 const MPG123_IGNORE_INFOFRAME = 0x04000;
312 const MPG123_AUTO_RESAMPLE = 0x08000;
313 const MPG123_PICTURE = 0x10000;
314 }
315}
316
317#[derive(Clone, Copy)]
318#[repr(C)]
319pub enum mpg123_param_rva {
320 MPG123_RVA_OFF = 0,
321 MPG123_RVA_MIX = 1,
322 MPG123_RVA_ALBUM = 2,
323}
324pub use mpg123_param_rva::*;
325
326#[derive(Clone, Copy)]
327#[repr(C)]
328pub struct mpg123_picture {
329 pub _type: c_char,
330 pub description: mpg123_string,
331 pub mime_type: mpg123_string,
332 pub size: size_t,
333 pub data: *mut c_uchar,
334}
335
336#[derive(Clone, Copy)]
337#[repr(C)]
338pub enum mpg123_state {
339 MPG123_ACCURATE = 1,
340 MPG123_BUFFERFILL,
341 MPG123_FRANKENSTEIN,
342 MPG123_FRESH_DECODER,
343}
344pub use mpg123_state::*;
345
346#[derive(Clone, Copy)]
347#[repr(C)]
348pub struct mpg123_string {
349 pub p: *mut c_char,
350 pub size: size_t,
351 pub fill: size_t,
352}
353
354#[derive(Clone, Copy)]
355#[repr(C)]
356pub struct mpg123_text {
357 pub lang: [c_char; 3],
358 pub id: [c_char; 4],
359 pub description: mpg123_string,
360 pub text: mpg123_string,
361}
362
363#[derive(Clone, Copy)]
364#[repr(C)]
365pub enum mpg123_text_encoding {
366 mpg123_text_unknown = 0,
367 mpg123_text_utf8 = 1,
368 mpg123_text_latin1 = 2,
369 mpg123_text_icy = 3,
370 mpg123_text_cp1252 = 4,
371 mpg123_text_utf16 = 5,
372 mpg123_text_utf16bom = 6,
373 mpg123_text_utf16be = 7,
374}
375pub use mpg123_text_encoding::*;
376
377#[derive(Clone, Copy)]
378#[repr(C)]
379pub enum mpg123_vbr {
380 MPG123_CBR = 0,
381 MPG123_VBR,
382 MPG123_ABR,
383}
384pub use mpg123_vbr::*;
385
386#[derive(Clone, Copy)]
387#[repr(C)]
388pub enum mpg123_version {
389 MPG123_1_0 = 0,
390 MPG123_2_0,
391 MPG123_2_5,
392}
393pub use mpg123_version::*;
394
395extern "C" {
396 pub fn mpg123_init() -> c_int;
397 pub fn mpg123_exit();
398 pub fn mpg123_new(decoder: *const c_char, error: *mut c_int) -> *mut mpg123_handle;
399 pub fn mpg123_delete(mh: *mut mpg123_handle);
400 pub fn mpg123_param(
401 mh: *mut mpg123_handle,
402 _type: mpg123_parms,
403 value: c_long,
404 fvalue: c_double,
405 ) -> c_int;
406 pub fn mpg123_getparam(
407 mh: *mut mpg123_handle,
408 _type: mpg123_parms,
409 value: *mut c_long,
410 fvalue: *mut c_double,
411 ) -> c_int;
412 pub fn mpg123_feature(key: mpg123_feature_set) -> c_int;
413 pub fn mpg123_plain_strerror(errcode: c_int) -> *const c_char;
414 pub fn mpg123_strerror(mh: *mut mpg123_handle) -> *const c_char;
415 pub fn mpg123_errcode(mh: *mut mpg123_handle) -> c_int;
416 pub fn mpg123_decoders() -> *mut *const c_char;
417 pub fn mpg123_supported_decoders() -> *mut *const c_char;
418 pub fn mpg123_decoder(mh: *mut mpg123_handle, decoder_name: *const c_char) -> c_int;
419 pub fn mpg123_current_decoder(mh: *mut mpg123_handle) -> *const c_char;
420 pub fn mpg123_rates(list: *mut *const c_long, number: *mut size_t);
421 pub fn mpg123_encodings(list: *mut *const c_int, number: *mut size_t);
422 pub fn mpg123_encsize(encoding: c_int) -> c_int;
423 pub fn mpg123_format_none(mh: *mut mpg123_handle) -> c_int;
424 pub fn mpg123_format_all(mh: *mut mpg123_handle) -> c_int;
425 pub fn mpg123_format(
426 mh: *mut mpg123_handle,
427 rate: c_long,
428 channels: c_int,
429 encodings: c_int,
430 ) -> c_int;
431 pub fn mpg123_format_support(mh: *mut mpg123_handle, rate: c_long, encoding: c_int) -> c_int;
432 pub fn mpg123_getformat(
433 mh: *mut mpg123_handle,
434 rate: *mut c_long,
435 channels: *mut c_int,
436 encoding: *mut c_int,
437 ) -> c_int;
438 pub fn mpg123_open(mh: *mut mpg123_handle, path: *const c_char) -> c_int;
439 pub fn mpg123_open_fd(mh: *mut mpg123_handle, fd: c_int) -> c_int;
440 pub fn mpg123_open_handle(mh: *mut mpg123_handle, iohandle: *mut c_void) -> c_int;
441 pub fn mpg123_open_feed(mh: *mut mpg123_handle) -> c_int;
442 pub fn mpg123_close(mh: *mut mpg123_handle) -> c_int;
443 pub fn mpg123_read(
444 mh: *mut mpg123_handle,
445 outmemory: *mut c_uchar,
446 outmemsize: size_t,
447 done: *mut size_t,
448 ) -> c_int;
449 pub fn mpg123_feed(mh: *mut mpg123_handle, _in: *const c_uchar, size: size_t) -> c_int;
450 pub fn mpg123_decode(
451 mh: *mut mpg123_handle,
452 inmemory: *const c_uchar,
453 inmemsize: size_t,
454 outmemory: *mut c_uchar,
455 outmemsize: size_t,
456 done: *mut size_t,
457 ) -> c_int;
458 pub fn mpg123_decode_frame(
459 mh: *mut mpg123_handle,
460 num: *mut off_t,
461 audio: *mut *mut c_uchar,
462 bytes: *mut size_t,
463 ) -> c_int;
464 pub fn mpg123_framebyframe_decode(
465 mh: *mut mpg123_handle,
466 num: *mut off_t,
467 audio: *mut *mut c_uchar,
468 bytes: *mut size_t,
469 ) -> c_int;
470 pub fn mpg123_framebyframe_next(mh: *mut mpg123_handle) -> c_int;
471 pub fn mpg123_framedata(
472 mh: *mut mpg123_handle,
473 header: *mut c_ulong,
474 bodydata: *mut *mut c_uchar,
475 bodybytes: *mut size_t,
476 ) -> c_int;
477 pub fn mpg123_framepos(mh: *mut mpg123_handle) -> off_t;
478 pub fn mpg123_tell(mh: *mut mpg123_handle) -> off_t;
479 pub fn mpg123_tellframe(mh: *mut mpg123_handle) -> off_t;
480 pub fn mpg123_tell_stream(mh: *mut mpg123_handle) -> off_t;
481 pub fn mpg123_seek(mh: *mut mpg123_handle, sampleoff: off_t, whence: c_int) -> off_t;
482 pub fn mpg123_feedseek(
483 mh: *mut mpg123_handle,
484 sampleoff: off_t,
485 whence: c_int,
486 input_offset: *mut off_t,
487 ) -> off_t;
488 pub fn mpg123_seek_frame(mh: *mut mpg123_handle, frameoff: off_t, whence: c_int) -> off_t;
489 pub fn mpg123_timeframe(mh: *mut mpg123_handle, sec: c_double) -> off_t;
490 pub fn mpg123_index(
491 mh: *mut mpg123_handle,
492 offsets: *mut *mut off_t,
493 step: *mut off_t,
494 fill: *mut size_t,
495 ) -> c_int;
496 pub fn mpg123_set_index(
497 mh: *mut mpg123_handle,
498 offsets: *mut off_t,
499 step: off_t,
500 fill: size_t,
501 ) -> c_int;
502 pub fn mpg123_position(
503 mh: *mut mpg123_handle,
504 frame_offset: off_t,
505 buffered_bytes: off_t,
506 current_frame: *mut off_t,
507 frames_left: *mut off_t,
508 current_seconds: *mut c_double,
509 seconds_left: *mut c_double,
510 ) -> c_int;
511 pub fn mpg123_eq(
512 mh: *mut mpg123_handle,
513 channel: mpg123_channels,
514 band: c_int,
515 val: c_double,
516 ) -> c_int;
517 pub fn mpg123_geteq(mh: *mut mpg123_handle, channel: mpg123_channels, band: c_int) -> c_double;
518 pub fn mpg123_reset_eq(mh: *mut mpg123_handle) -> c_int;
519 pub fn mpg123_volume(mh: *mut mpg123_handle, vol: c_double) -> c_int;
520 pub fn mpg123_volume_change(mh: *mut mpg123_handle, change: c_double) -> c_int;
521 pub fn mpg123_getvolume(
522 mh: *mut mpg123_handle,
523 base: *mut c_double,
524 really: *mut c_double,
525 rva_db: *mut c_double,
526 ) -> c_int;
527 pub fn mpg123_info(mh: *mut mpg123_handle, mi: *mut mpg123_frameinfo) -> c_int;
528 pub fn mpg123_safe_buffer() -> size_t;
529 pub fn mpg123_scan(mh: *mut mpg123_handle) -> c_int;
530 pub fn mpg123_framelength(mh: *mut mpg123_handle) -> off_t;
531 pub fn mpg123_length(mh: *mut mpg123_handle) -> off_t;
532 pub fn mpg123_set_filesize(mh: *mut mpg123_handle, size: off_t) -> c_int;
533 pub fn mpg123_tpf(mh: *mut mpg123_handle) -> c_double;
534 pub fn mpg123_spf(mh: *mut mpg123_handle) -> c_int;
535 pub fn mpg123_clip(mh: *mut mpg123_handle) -> c_long;
536 pub fn mpg123_getstate(
537 mh: *mut mpg123_handle,
538 key: mpg123_state,
539 val: *mut c_long,
540 fval: *mut c_double,
541 ) -> c_int;
542 pub fn mpg123_init_string(sb: *mut mpg123_string);
543 pub fn mpg123_free_string(sb: *mut mpg123_string);
544 pub fn mpg123_resize_string(sb: *mut mpg123_string, news: size_t) -> c_int;
545 pub fn mpg123_grow_string(sb: *mut mpg123_string, news: size_t) -> c_int;
546 pub fn mpg123_copy_string(from: *mut mpg123_string, to: *mut mpg123_string) -> c_int;
547 pub fn mpg123_add_string(sb: *mut mpg123_string, stuff: *const c_char) -> c_int;
548 pub fn mpg123_add_substring(
549 sb: *mut mpg123_string,
550 stuff: *const c_char,
551 from: size_t,
552 count: size_t,
553 ) -> c_int;
554 pub fn mpg123_set_string(sb: *mut mpg123_string, stuff: *const c_char) -> c_int;
555 pub fn mpg123_set_substring(
556 sb: *mut mpg123_string,
557 stuff: *const c_char,
558 from: size_t,
559 count: size_t,
560 ) -> c_int;
561 pub fn mpg123_strlen(sb: *mut mpg123_string, utf8: c_int) -> size_t;
562 pub fn mpg123_chomp_string(sb: *mut mpg123_string) -> c_int;
563 pub fn mpg123_enc_from_id3(id3_enc_byte: c_uchar) -> mpg123_text_encoding;
564 pub fn mpg123_store_utf8(
565 sb: *mut mpg123_string,
566 enc: mpg123_text_encoding,
567 source: *const c_uchar,
568 source_size: size_t,
569 ) -> c_int;
570 pub fn mpg123_meta_check(mh: *mut mpg123_handle) -> c_int;
571 pub fn mpg123_meta_free(mh: *mut mpg123_handle);
572 pub fn mpg123_id3(
573 mh: *mut mpg123_handle,
574 v1: *mut *mut mpg123_id3v1,
575 v2: *mut *mut mpg123_id3v2,
576 ) -> c_int;
577 pub fn mpg123_icy(mh: *mut mpg123_handle, icy_meta: *mut *mut c_char) -> c_int;
578 pub fn mpg123_icy2utf8(icy_text: *const c_char) -> *mut c_char;
579 pub fn mpg123_parnew(
580 mp: *mut mpg123_pars,
581 decoder: *const c_char,
582 error: *mut c_int,
583 ) -> *mut mpg123_handle;
584 pub fn mpg123_new_pars(error: *mut c_int) -> *mut mpg123_pars;
585 pub fn mpg123_delete_pars(mp: *mut mpg123_pars);
586 pub fn mpg123_fmt_none(mp: *mut mpg123_pars) -> c_int;
587 pub fn mpg123_fmt_all(mp: *mut mpg123_pars) -> c_int;
588 pub fn mpg123_fmt(
589 mp: *mut mpg123_pars,
590 rate: c_long,
591 channels: c_int,
592 encodings: c_int,
593 ) -> c_int;
594 pub fn mpg123_fmt_support(mp: *mut mpg123_pars, rate: c_long, encoding: c_int) -> c_int;
595 pub fn mpg123_par(
596 mp: *mut mpg123_pars,
597 _type: mpg123_parms,
598 value: c_long,
599 fvalue: c_double,
600 ) -> c_int;
601 pub fn mpg123_getpar(
602 mp: *mut mpg123_pars,
603 _type: mpg123_parms,
604 value: *mut c_long,
605 fvalue: *mut c_double,
606 ) -> c_int;
607 pub fn mpg123_replace_buffer(mh: *mut mpg123_handle, data: *mut c_uchar, size: size_t)
608 -> c_int;
609 pub fn mpg123_outblock(mh: *mut mpg123_handle) -> size_t;
610 pub fn mpg123_replace_reader(
611 mh: *mut mpg123_handle,
612 r_read: unsafe extern "C" fn(c_int, *mut c_void, size_t) -> ssize_t,
613 r_lseek: unsafe extern "C" fn(c_int, off_t, c_int) -> off_t,
614 ) -> c_int;
615 pub fn mpg123_replace_reader_handle(
616 mh: *mut mpg123_handle,
617 r_read: unsafe extern "C" fn(*mut c_void, *mut c_void, size_t) -> ssize_t,
618 r_lseek: unsafe extern "C" fn(*mut c_void, off_t, c_int) -> off_t,
619 cleanup: unsafe extern "C" fn(*mut c_void),
620 ) -> c_int;
621}