pub struct ResampleSpec {
pub input: SampleRate,
pub output: SampleRate,
pub interpolation: InterpolationMode,
}Expand description
Re-exports the math signal core API. Data type for resample spec.
Fields§
§input: SampleRateThe input value.
output: SampleRateThe output value.
interpolation: InterpolationModeThe interpolation value.
Implementations§
Source§impl ResampleSpec
impl ResampleSpec
Sourcepub fn new(
input: SampleRate,
output: SampleRate,
interpolation: InterpolationMode,
) -> Result<ResampleSpec, DetectError>
pub fn new( input: SampleRate, output: SampleRate, interpolation: InterpolationMode, ) -> Result<ResampleSpec, DetectError>
Creates a new value.
Sourcepub fn validate(self) -> Result<(), DetectError>
pub fn validate(self) -> Result<(), DetectError>
Validates this value.
Sourcepub fn ratio(self) -> ResampleRatio
pub fn ratio(self) -> ResampleRatio
Returns ratio.
Trait Implementations§
Source§impl Clone for ResampleSpec
impl Clone for ResampleSpec
Source§fn clone(&self) -> ResampleSpec
fn clone(&self) -> ResampleSpec
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 moreimpl Copy for ResampleSpec
Source§impl Debug for ResampleSpec
impl Debug for ResampleSpec
impl Eq for ResampleSpec
Source§impl PartialEq for ResampleSpec
impl PartialEq for ResampleSpec
Source§fn eq(&self, other: &ResampleSpec) -> bool
fn eq(&self, other: &ResampleSpec) -> bool
Tests for
self and other values to be equal, and is used by ==.impl StructuralPartialEq for ResampleSpec
Auto Trait Implementations§
impl Freeze for ResampleSpec
impl RefUnwindSafe for ResampleSpec
impl Send for ResampleSpec
impl Sync for ResampleSpec
impl Unpin for ResampleSpec
impl UnsafeUnpin for ResampleSpec
impl UnwindSafe for ResampleSpec
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