pub struct XmSampleHeader {}Expand description
Decoded sample header (40 bytes + variable-length PCM body following all sample headers of the instrument).
Fields§
§name: String§length: u32Sample length in bytes (not frames). For 16-bit samples the
frame count is length / 2.
loop_start: u32§loop_length: u32§volume: u8§finetune: i8Signed finetune -128..+127.
type_byte: u8§panning: u8§relative_note: i8Signed relative-note, -96..+95 (0 => C-4 = C-4).
loop_mode: XmSampleLoopMode§is_16_bit: bool§pcm16: Vec<i16>Decoded PCM samples. Empty until extract_samples is called.
For 16-bit samples the values are i16 halves, one per frame.
pcm8: Vec<i8>Decoded 8-bit PCM samples (if !is_16_bit). Empty otherwise.
Trait Implementations§
Source§impl Clone for XmSampleHeader
impl Clone for XmSampleHeader
Source§fn clone(&self) -> XmSampleHeader
fn clone(&self) -> XmSampleHeader
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for XmSampleHeader
impl Debug for XmSampleHeader
Source§impl Default for XmSampleHeader
impl Default for XmSampleHeader
Source§fn default() -> XmSampleHeader
fn default() -> XmSampleHeader
Returns the “default value” for a type. Read more
Source§impl SampleSource for XmSampleHeader
impl SampleSource for XmSampleHeader
Auto Trait Implementations§
impl Freeze for XmSampleHeader
impl RefUnwindSafe for XmSampleHeader
impl Send for XmSampleHeader
impl Sync for XmSampleHeader
impl Unpin for XmSampleHeader
impl UnsafeUnpin for XmSampleHeader
impl UnwindSafe for XmSampleHeader
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