pub struct PerceptualEncodedAudio {
pub segments: NonEmptyVec<EncodedSegment>,
pub original_length: usize,
pub sample_rate: NonZeroU32,
}Expand description
In-memory encoded representation produced by PerceptualCodec.
Contains one or more EncodedSegment values in temporal order. A single
segment is produced when window switching is disabled; multiple segments
appear when transient frames are re-encoded with a shorter window.
Everything needed to reconstruct the original signal is embedded here: MDCT parameters, quantization step sizes, and the original signal length.
Fields§
§segments: NonEmptyVec<EncodedSegment>Encoded segments in temporal order.
original_length: usizeTotal original signal length in samples.
sample_rate: NonZeroU32Sample rate of the original signal.
Trait Implementations§
Source§impl Clone for PerceptualEncodedAudio
impl Clone for PerceptualEncodedAudio
Source§fn clone(&self) -> PerceptualEncodedAudio
fn clone(&self) -> PerceptualEncodedAudio
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PerceptualEncodedAudio
impl RefUnwindSafe for PerceptualEncodedAudio
impl Send for PerceptualEncodedAudio
impl Sync for PerceptualEncodedAudio
impl Unpin for PerceptualEncodedAudio
impl UnsafeUnpin for PerceptualEncodedAudio
impl UnwindSafe for PerceptualEncodedAudio
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Src, Dst> ConvertTo<Dst> for Srcwhere
Dst: ConvertFrom<Src>,
impl<Src, Dst> ConvertTo<Dst> for Srcwhere
Dst: ConvertFrom<Src>,
Source§fn convert_to(self) -> Dst
fn convert_to(self) -> Dst
Converts this sample into
Dst using audio-aware scaling. Read moreSource§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more