pub struct PreSkip { /* private fields */ }Expand description
Pre-skip accumulator (RFC 7845 §5.1 item 4 / §4.2 trimming).
The §5.1 pre-skip is the number of 48 kHz samples (per channel) to discard from the start of the decoded output, giving the decoder’s internal filters time to converge before audible playback begins. This helper threads the remaining pre-skip count across packets: feed it each decoded packet’s per-channel sample count and it reports how many leading per-channel samples of that packet to drop.
Trimming is applied to the per-channel sample stream; for interleaved
PCM with C channels, multiply the returned count by C to get the
number of interleaved samples to drop from the front of the buffer.
Implementations§
Trait Implementations§
impl Copy for PreSkip
impl Eq for PreSkip
impl StructuralPartialEq for PreSkip
Auto Trait Implementations§
impl Freeze for PreSkip
impl RefUnwindSafe for PreSkip
impl Send for PreSkip
impl Sync for PreSkip
impl Unpin for PreSkip
impl UnsafeUnpin for PreSkip
impl UnwindSafe for PreSkip
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