Struct Window Plan
pub struct WindowPlan { /* private fields */ }Expand description
Owned f64 window coefficients for 1..=1048576 samples. Construction evaluates cosines/allocates on a control thread; application allocates nothing. N=1 is unity for every family/convention. Tiny negative rounded taps are retained. Coherent gain and energy are computed from actual coefficients; zero-sum windows return no equivalent noise bandwidth. No automatic gain correction, overlap/add policy, nonfinite sanitization or native deadline guarantee.
Implementations§
§impl WindowPlan
impl WindowPlan
pub fn new( kind: WindowKind, convention: WindowConvention, size: usize, ) -> Result<Self, WindowError>
pub fn coefficients(&self) -> &[f64]
pub fn coherent_gain(&self) -> f64
pub fn coherent_gain(&self) -> f64
Mean coefficient, for coherent-bin amplitude correction on the caller.
pub fn equivalent_noise_bandwidth(&self) -> Option<f64>
pub fn equivalent_noise_bandwidth(&self) -> Option<f64>
N*energy/sum^2 in FFT-bin units, or None for exact zero sum.
pub fn apply(&self, samples: &mut [f64]) -> Result<(), WindowError>
pub fn apply(&self, samples: &mut [f64]) -> Result<(), WindowError>
Exact length required, rejected before mutation. Nonfinite audio propagates.
Trait Implementations§
§impl Clone for WindowPlan
impl Clone for WindowPlan
§fn clone(&self) -> WindowPlan
fn clone(&self) -> WindowPlan
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · §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 WindowPlan
impl RefUnwindSafe for WindowPlan
impl Send for WindowPlan
impl Sync for WindowPlan
impl Unpin for WindowPlan
impl UnsafeUnpin for WindowPlan
impl UnwindSafe for WindowPlan
Blanket Implementations§
§impl<T> BorrowMut<T> for T
impl<T> BorrowMut<T> for T
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more