pub struct Event {
pub sample_offset: u32,
pub port: u8,
pub body: EventBody,
}Expand description
A timestamped event within a process block.
Copy because every EventBody variant is POD - lets the
audio path move events without per-event clones.
Fields§
§sample_offset: u32Sample offset within the block (0..num_samples).
port: u8MIDI port this event arrived on / goes out on (0-based). Single-
port plugins - the vast majority - always see 0 and can ignore
it. A plugin that declares more than one MIDI port (see
PluginInfo::midi_input_ports / midi_output_ports) filters
inbound events by port and stamps outbound ones with the port
they should leave on. Formats without a multi-port MIDI transport
clamp everything to 0.
body: EventBodyImplementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Event
impl RefUnwindSafe for Event
impl Send for Event
impl Sync for Event
impl Unpin for Event
impl UnsafeUnpin for Event
impl UnwindSafe for Event
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more