pub enum Step {
Resample {
from_hz: u32,
to_hz: u32,
quality: Quality,
},
Widen {
from: SampleFormat,
to: SampleFormat,
},
Repack {
from: SampleFormat,
to: SampleFormat,
},
Narrow {
from: SampleFormat,
to: SampleFormat,
mode: Narrowing,
},
IntToFloat {
from: SampleFormat,
},
Quantise {
to: SampleFormat,
mode: Narrowing,
},
MonoToStereo,
}Expand description
One thing a conversion does.
Variants§
Resample
The sample rate changes: a polyphase windowed-sinc resampler. Lossy.
Widen
An integer sample gains bits: the old bits keep their place and the new low ones are zero. A move to a bigger slot size comes with it. Bit-exact.
Repack
An integer sample keeps its bits and changes slot size, as 24-bit packed in 3 bytes into 24-bit in 4. Bit-exact.
Narrow
An integer sample loses bits. Lossy.
IntToFloat
An integer sample becomes a float. Lossless up to 24 significant bits (a float holds them exactly), lossy beyond.
Fields
§
from: SampleFormatQuantise
A float sample is rounded to integers (after resampling, the rounding of the resampled values). Lossy.
MonoToStereo
One channel becomes two identical ones. Lossless, not identical.
Implementations§
Trait Implementations§
impl Copy for Step
impl StructuralPartialEq for Step
Auto Trait Implementations§
impl Forget for Step
impl Freeze for Step
impl Move for Step
impl RefUnwindSafe for Step
impl Send for Step
impl Sync for Step
impl Unpin for Step
impl UnsafeUnpin for Step
impl UnwindSafe for Step
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