Skip to content

Commit

Permalink
mark all structs Copy and make all struct fields pub
Browse files Browse the repository at this point in the history
  • Loading branch information
glowcoil committed Apr 12, 2021
1 parent 98bb0a4 commit d3be048
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ pub mod time_info_flags {
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct MidiEvent {
pub event_type: i32,
pub byte_size: i32,
Expand All @@ -149,6 +150,7 @@ pub struct MidiEvent {
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct SysExEvent {
pub event_type: i32,
pub byte_size: i32,
Expand All @@ -161,15 +163,17 @@ pub struct SysExEvent {
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct Event {
dump: [u8; mem::size_of::<MidiEvent>()],
pub dump: [u8; mem::size_of::<MidiEvent>()],
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct Events {
num_events: i32,
reserved: *const c_void,
events: [*const Event; 2],
pub num_events: i32,
pub reserved: *const c_void,
pub events: [*const Event; 2],
}

pub mod string_constants {
Expand Down Expand Up @@ -197,6 +201,7 @@ pub mod plug_category {
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct ParameterProperties {
pub step_float: f32,
pub small_step_float: f32,
Expand Down Expand Up @@ -227,6 +232,7 @@ pub mod parameter_flags {
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct AEffect {
pub magic: i32,
pub dispatcher: extern "C" fn(*mut AEffect, i32, i32, isize, *mut c_void, f32) -> isize,
Expand All @@ -251,6 +257,7 @@ pub struct AEffect {
}

#[repr(C)]
#[derive(Copy, Clone)]
pub struct TimeInfo {
pub sample_pos: f64,
pub sample_rate: f64,
Expand Down

0 comments on commit d3be048

Please sign in to comment.