pub struct StftConfigBuilder<T: Float> { /* private fields */ }Expand description
Builder for StftConfig with fluent API
Implementations§
Source§impl<T: Float + FromPrimitive + Debug> StftConfigBuilder<T>
impl<T: Float + FromPrimitive + Debug> StftConfigBuilder<T>
Sourcepub fn window(self, window: WindowType) -> Self
pub fn window(self, window: WindowType) -> Self
Set the window type (default: Hann)
Sourcepub fn reconstruction_mode(self, mode: ReconstructionMode) -> Self
pub fn reconstruction_mode(self, mode: ReconstructionMode) -> Self
Set the reconstruction mode (default: OLA)
Sourcepub fn build(self) -> Result<StftConfig<T>, ConfigError<T>>
pub fn build(self) -> Result<StftConfig<T>, ConfigError<T>>
Build the StftConfig, validating all parameters
Returns an error if:
- fft_size is not set or not a power of two
- hop_size is not set, zero, or greater than fft_size
- COLA/NOLA conditions are violated
Trait Implementations§
Auto Trait Implementations§
impl<T> Freeze for StftConfigBuilder<T>
impl<T> RefUnwindSafe for StftConfigBuilder<T>where
T: RefUnwindSafe,
impl<T> Send for StftConfigBuilder<T>where
T: Send,
impl<T> Sync for StftConfigBuilder<T>where
T: Sync,
impl<T> Unpin for StftConfigBuilder<T>where
T: Unpin,
impl<T> UnwindSafe for StftConfigBuilder<T>where
T: UnwindSafe,
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> 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