|
| 1 | +use super::c_void; |
| 2 | + |
| 3 | +#[repr(C)] |
| 4 | +#[derive(Copy, Clone)] |
| 5 | +pub struct Atrac3BufferInfo { |
| 6 | + pub puc_write_position_first_buf: *mut u8, |
| 7 | + pub ui_writable_byte_first_buf: u32, |
| 8 | + pub ui_min_write_byte_first_buf: u32, |
| 9 | + pub ui_read_position_first_buf: u32, |
| 10 | + pub puc_write_position_second_buf: *mut u8, |
| 11 | + pub ui_writable_byte_second_buf: u32, |
| 12 | + pub ui_min_write_byte_second_buf: u32, |
| 13 | + pub ui_read_position_second_buf: u32, |
| 14 | +} |
| 15 | + |
| 16 | +extern { |
| 17 | + pub fn sceAtracGetAtracID(ui_codec_type: u32) -> i32; |
| 18 | + pub fn sceAtracSetDataAndGetID( |
| 19 | + buf: *mut c_void, |
| 20 | + bufsize: usize, |
| 21 | + ) -> i32; |
| 22 | + pub fn sceAtracDecodeData( |
| 23 | + atrac_id: i32, |
| 24 | + out_samples: *mut u16, |
| 25 | + out_n: *mut i32, |
| 26 | + out_end: *mut i32, |
| 27 | + out_remain_frame: *mut i32, |
| 28 | + ) -> i32; |
| 29 | + pub fn sceAtracGetRemainFrame( |
| 30 | + atrac_id: i32, |
| 31 | + out_remain_frame: *mut i32, |
| 32 | + ) -> i32; |
| 33 | + pub fn sceAtracGetStreamDataInfo( |
| 34 | + atrac_id: i32, |
| 35 | + write_pointer: *mut *mut u8, |
| 36 | + available_bytes: *mut u32, |
| 37 | + read_offset: *mut u32, |
| 38 | + ) -> i32; |
| 39 | + pub fn sceAtracAddStreamData( |
| 40 | + atrac_id: i32, |
| 41 | + bytes_to_add: u32, |
| 42 | + ) -> i32; |
| 43 | + pub fn sceAtracGetBitrate( |
| 44 | + atrac_id: i32, |
| 45 | + out_bitrate: *mut i32, |
| 46 | + ) -> i32; |
| 47 | + pub fn sceAtracSetLoopNum( |
| 48 | + atrac_id: i32, |
| 49 | + nloops: i32, |
| 50 | + ) -> i32; |
| 51 | + pub fn sceAtracReleaseAtracID(atrac_id: i32) -> i32; |
| 52 | + pub fn sceAtracGetNextSample( |
| 53 | + atrac_id: i32, |
| 54 | + out_n: *mut i32, |
| 55 | + ) -> i32; |
| 56 | + pub fn sceAtracGetMaxSample( |
| 57 | + atrac_id: i32, |
| 58 | + out_max: *mut i32, |
| 59 | + ) -> i32; |
| 60 | + pub fn sceAtracGetBufferInfoForReseting( |
| 61 | + atrac_id: i32, |
| 62 | + ui_sample: u32, |
| 63 | + pbuffer_info: *mut Atrac3BufferInfo, |
| 64 | + ) -> i32; |
| 65 | + pub fn sceAtracGetChannel( |
| 66 | + atrac_id: i32, |
| 67 | + pui_channel: *mut u32, |
| 68 | + ) -> i32; |
| 69 | + pub fn sceAtracGetInternalErrorInfo( |
| 70 | + atrac_id: i32, |
| 71 | + pi_result: *mut i32, |
| 72 | + ) -> i32; |
| 73 | + pub fn sceAtracGetLoopStatus( |
| 74 | + atrac_id: i32, |
| 75 | + pi_loop_num: *mut i32, |
| 76 | + pui_loop_status: *mut u32, |
| 77 | + ) -> i32; |
| 78 | + pub fn sceAtracGetNextDecodePosition( |
| 79 | + atrac_id: i32, |
| 80 | + pui_sample_position: *mut u32, |
| 81 | + ) -> i32; |
| 82 | + pub fn sceAtracGetSecondBufferInfo( |
| 83 | + atrac_id: i32, |
| 84 | + pui_position: *mut u32, |
| 85 | + pui_data_byte: *mut u32, |
| 86 | + ) -> i32; |
| 87 | + pub fn sceAtracGetSoundSample( |
| 88 | + atrac_id: i32, |
| 89 | + pi_end_sample: *mut i32, |
| 90 | + pi_loop_start_sample: *mut i32, |
| 91 | + pi_loop_end_sample: *mut i32, |
| 92 | + ) -> i32; |
| 93 | + pub fn sceAtracResetPlayPosition( |
| 94 | + atrac_id: i32, |
| 95 | + ui_sample: u32, |
| 96 | + ui_write_byte_first_buf: u32, |
| 97 | + ui_write_byte_second_buf: u32, |
| 98 | + ) -> i32; |
| 99 | + pub fn sceAtracSetData( |
| 100 | + atrac_id: i32, |
| 101 | + puc_buffer_addr: *mut u8, |
| 102 | + ui_buffer_byte: u32, |
| 103 | + ) -> i32; |
| 104 | + pub fn sceAtracSetHalfwayBuffer( |
| 105 | + atrac_id: i32, |
| 106 | + puc_buffer_addr: *mut u8, |
| 107 | + ui_read_byte: u32, |
| 108 | + ui_buffer_byte: u32, |
| 109 | + ) -> i32; |
| 110 | + pub fn sceAtracSetHalfwayBufferAndGetID( |
| 111 | + puc_buffer_addr: *mut u8, |
| 112 | + ui_read_byte: u32, |
| 113 | + ui_buffer_byte: u32, |
| 114 | + ) -> i32; |
| 115 | + pub fn sceAtracSetSecondBuffer( |
| 116 | + atrac_id: i32, |
| 117 | + puc_second_buffer_addr: *mut u8, |
| 118 | + ui_second_buffer_byte: u32, |
| 119 | + ) -> i32; |
| 120 | +} |
0 commit comments