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§
Source§impl<T: Clone + Float> Clone for StftConfigBuilder<T>
impl<T: Clone + Float> Clone for StftConfigBuilder<T>
Source§fn clone(&self) -> StftConfigBuilder<T>
fn clone(&self) -> StftConfigBuilder<T>
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 moreSource§impl<T: Float + FromPrimitive + Debug> Default for StftConfigBuilder<T>
impl<T: Float + FromPrimitive + Debug> Default for StftConfigBuilder<T>
impl<T: Float> StructuralPartialEq for StftConfigBuilder<T>
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