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 Freeze for MidiEvent
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