pub struct MidiEvent(/* private fields */);
Expand description
snd_midi_event_t Wrapper
Sequencer event <-> MIDI byte stream coder
Implementations§
source§impl MidiEvent
impl MidiEvent
pub fn new(bufsize: u32) -> Result<MidiEvent>
pub fn resize_buffer(&self, bufsize: u32) -> Result<()>
sourcepub fn enable_running_status(&self, enable: bool)
pub fn enable_running_status(&self, enable: bool)
Note: this corresponds to snd_midi_event_no_status, but on and off are switched.
Alsa-lib is a bit confusing here. Anyhow, set “enable” to true to enable running status.
pub fn reset_encode(&self)
pub fn reset_decode(&self)
pub fn decode(&self, buf: &mut [u8], ev: &mut Event<'_>) -> Result<usize>
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for MidiEvent
impl !Send for MidiEvent
impl !Sync for MidiEvent
impl Unpin for MidiEvent
impl UnwindSafe for MidiEvent
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