pub struct SampleBody {
pub pcm: Vec<i8>,
pub loop_start: u32,
pub loop_length: u32,
pub volume: u8,
pub finetune: i8,
}Expand description
Per-sample decoded body plus the loop metadata needed by the mixer.
Fields§
§pcm: Vec<i8>Raw signed 8-bit PCM. Empty if the header declared zero length.
loop_start: u32Loop start in samples (0 if sample does not loop).
loop_length: u32Loop length in samples (0 if sample does not loop — spec says repeat length of 2 also means “no loop”).
volume: u8Default volume 0..=64.
finetune: i8Finetune -8..=7.
Implementations§
Trait Implementations§
Source§impl Clone for SampleBody
impl Clone for SampleBody
Source§fn clone(&self) -> SampleBody
fn clone(&self) -> SampleBody
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 SampleBody
impl Debug for SampleBody
Source§impl Default for SampleBody
impl Default for SampleBody
Source§fn default() -> SampleBody
fn default() -> SampleBody
Returns the “default value” for a type. Read more
Source§impl SampleSource for SampleBody
impl SampleSource for SampleBody
Auto Trait Implementations§
impl Freeze for SampleBody
impl RefUnwindSafe for SampleBody
impl Send for SampleBody
impl Sync for SampleBody
impl Unpin for SampleBody
impl UnsafeUnpin for SampleBody
impl UnwindSafe for SampleBody
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