pub struct ResampleConfig {
pub input_rate: u32,
pub output_rate: u32,
pub quality: ResampleQuality,
pub anti_alias: bool,
}Expand description
Configuration for the resample filter.
Fields§
§input_rate: u32Input sample rate in Hz.
output_rate: u32Output sample rate in Hz.
quality: ResampleQualityQuality preset.
anti_alias: boolAnti-aliasing filter enabled.
Implementations§
Source§impl ResampleConfig
impl ResampleConfig
Sourcepub fn with_quality(self, quality: ResampleQuality) -> Self
pub fn with_quality(self, quality: ResampleQuality) -> Self
Set the quality preset.
Sourcepub fn with_anti_alias(self, enabled: bool) -> Self
pub fn with_anti_alias(self, enabled: bool) -> Self
Enable or disable anti-aliasing.
Trait Implementations§
Source§impl Clone for ResampleConfig
impl Clone for ResampleConfig
Source§fn clone(&self) -> ResampleConfig
fn clone(&self) -> ResampleConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ResampleConfig
impl Debug for ResampleConfig
Auto Trait Implementations§
impl Freeze for ResampleConfig
impl RefUnwindSafe for ResampleConfig
impl Send for ResampleConfig
impl Sync for ResampleConfig
impl Unpin for ResampleConfig
impl UnsafeUnpin for ResampleConfig
impl UnwindSafe for ResampleConfig
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<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