1use libc::{c_int, c_uint, c_void};
2
3#[repr(C)]
5#[derive(Debug)]
6pub struct Wave {
7 frame_count: c_uint,
8 sample_rate: c_uint,
9 sample_size: c_uint,
10 channels: c_uint,
11 data: *const c_void,
12}
13
14enum RAudioBuffer {}
15enum RAudioProcessor {}
16
17pub type AudioCallback = extern "C" fn(buffer_data: *const c_void, frames: c_uint);
18
19#[repr(C)]
21#[derive(Debug)]
22pub struct AudioStream {
23 buffer: *const RAudioBuffer,
25 processor: *const RAudioProcessor,
27
28 sample_rate: c_uint,
30 sample_size: c_uint,
32 channels: c_uint,
34}
35
36#[repr(C)]
38#[derive(Debug)]
39pub struct Sound {
40 stream: AudioStream,
42 frame_count: c_uint,
44}
45
46#[repr(C)]
47#[derive(Debug)]
48pub struct Music {
49 stream: AudioStream,
50 frame_count: c_uint,
51 looping: bool,
52
53 ctx_type: c_int,
54 ctx_data: *const c_void,
55}