pub enum ConversionKind {
None,
BitExact,
Lossless,
Lossy,
}Expand description
What a conversion does to the audio, from nothing to something irreversible. The order is the order of severity: a plan’s kind is the largest of its steps’.
Variants§
None
Nothing changes; the bytes pass through.
BitExact
Every sample value is exactly what it was: widening to more bits (zero-filled low bits) and moving a sample between slot sizes. A stream that was bit-perfect stays bit-perfect.
Lossless
No information is lost and the values can be got back, but the audio is not identical: mono duplicated to two channels, integers carried in a float that holds them exactly.
Lossy
Information is lost or rounded: fewer bits, a float turned into integers, a new sample rate.
Implementations§
Trait Implementations§
Source§impl Clone for ConversionKind
impl Clone for ConversionKind
impl Copy for ConversionKind
Source§impl Debug for ConversionKind
impl Debug for ConversionKind
impl Eq for ConversionKind
Source§impl Hash for ConversionKind
impl Hash for ConversionKind
Source§impl Ord for ConversionKind
impl Ord for ConversionKind
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialEq for ConversionKind
impl PartialEq for ConversionKind
Source§impl PartialOrd for ConversionKind
impl PartialOrd for ConversionKind
impl StructuralPartialEq for ConversionKind
Auto Trait Implementations§
impl Forget for ConversionKind
impl Freeze for ConversionKind
impl Move for ConversionKind
impl RefUnwindSafe for ConversionKind
impl Send for ConversionKind
impl Sync for ConversionKind
impl Unpin for ConversionKind
impl UnsafeUnpin for ConversionKind
impl UnwindSafe for ConversionKind
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