pub enum Narrowing {
Truncate,
TpdfDither,
}Expand description
What to do with the bits an integer narrowing or a float-to-integer step cannot keep.
Variants§
Truncate
Drop them: round toward negative infinity (an arithmetic shift). The error is correlated with the signal and has a mean of half a step.
TpdfDither
Add triangular-PDF noise of one step (peak) before rounding to nearest: the error becomes signal-independent noise at about -98 dBFS for 16 bits. The default.
Trait Implementations§
impl Copy for Narrowing
impl Eq for Narrowing
impl StructuralPartialEq for Narrowing
Auto Trait Implementations§
impl Forget for Narrowing
impl Freeze for Narrowing
impl Move for Narrowing
impl RefUnwindSafe for Narrowing
impl Send for Narrowing
impl Sync for Narrowing
impl Unpin for Narrowing
impl UnsafeUnpin for Narrowing
impl UnwindSafe for Narrowing
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