Struct Prepared Midi Input
pub struct PreparedMidiInput { /* private fields */ }Expand description
Unique callback producer. Prepare and destroy outside callbacks.
Implementations§
§impl PreparedMidiInput
impl PreparedMidiInput
pub fn new(capacity: usize) -> Result<(Self, MidiReceiver), MidiDeviceError>
pub fn new(capacity: usize) -> Result<(Self, MidiReceiver), MidiDeviceError>
Allocate a power-of-two capacity of 1..=1,024 complete packet slots.
pub fn capture(
&mut self,
timestamp_microseconds: u64,
bytes: &[u8],
) -> CaptureStatus
pub fn capture( &mut self, timestamp_microseconds: u64, bytes: &[u8], ) -> CaptureStatus
Reject malformed packets; when full drop the newest complete packet. No allocation, deallocation, locking, I/O, or timestamp scheduling.