pub struct MidiBuffer { /* private fields */ }Expand description
A buffer for collecting MIDI events during processing.
Uses a fixed-size array to avoid heap allocation during processing. Events should be added in chronological order (by sample_offset).
Implementations§
Source§impl MidiBuffer
impl MidiBuffer
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new empty MIDI buffer.
Uses std::array::from_fn with MidiEvent::default() since
MidiEvent is no longer Copy (due to Box<SysEx>).
Sourcepub fn has_overflowed(&self) -> bool
pub fn has_overflowed(&self) -> bool
Returns true if any push failed since the last clear.
Trait Implementations§
Source§impl Debug for MidiBuffer
impl Debug for MidiBuffer
Auto Trait Implementations§
impl Freeze for MidiBuffer
impl RefUnwindSafe for MidiBuffer
impl Send for MidiBuffer
impl Sync for MidiBuffer
impl Unpin for MidiBuffer
impl UnwindSafe for MidiBuffer
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