Skip to main content

parse_meta

Function parse_meta 

Source
pub fn parse_meta(meta_type: u8, data: &[u8]) -> Result<MetaEvent, AudioError>
Expand description

Decode a meta-event from its type byte and payload data (the bytes after the VLQ length, exactly len of them).

Structurally-decoded types validate their fixed length and error with AudioError::MalformedAudio on a mismatch; unrecognised types are kept in MetaEvent::Unknown.