pub struct FilterConfig {
pub num_filter: usize,
pub auto_reset: bool,
pub filter_callbacks: usize,
pub oc: [f64; 4],
pub fc: [f64; 4],
pub rc: [f64; 2],
pub r_offset: f64,
pub o_offset: f64,
pub o_scale: f64,
pub f_offset: f64,
pub f_scale: f64,
}Expand description
Recursive filter configuration matching C++ NDPluginProcess.
The C++ filter uses a single filter buffer and numFiltered-dependent coefficients:
Reset: filter[i] = rOffset + rc1filter[i] + rc2data[i]
Normal operation (after numFiltered is incremented): O1 = oScale * (oc1 + oc2/numFiltered) O2 = oScale * (oc3 + oc4/numFiltered) F1 = fScale * (fc1 + fc2/numFiltered) F2 = fScale * (fc3 + fc4/numFiltered) data[i] = oOffset + O1filter[i] + O2data[i] filter[i] = fOffset + F1filter[i] + F2data[i]
Fields§
§num_filter: usizeNumber of frames to average before auto-reset (if enabled).
auto_reset: boolAutomatically reset the filter when num_filtered reaches num_filter.
filter_callbacks: usizeOutput every N frames (0 = every frame).
oc: [f64; 4]Output coefficients [OC1, OC2, OC3, OC4].
fc: [f64; 4]Filter coefficients [FC1, FC2, FC3, FC4].
rc: [f64; 2]Reset coefficients [RC1, RC2].
r_offset: f64Reset offset (C++ rOffset).
o_offset: f64Output offset.
o_scale: f64Output scale.
f_offset: f64Filter offset.
f_scale: f64Filter scale.
Trait Implementations§
Source§impl Clone for FilterConfig
impl Clone for FilterConfig
Source§fn clone(&self) -> FilterConfig
fn clone(&self) -> FilterConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for FilterConfig
impl Debug for FilterConfig
Auto Trait Implementations§
impl Freeze for FilterConfig
impl RefUnwindSafe for FilterConfig
impl Send for FilterConfig
impl Sync for FilterConfig
impl Unpin for FilterConfig
impl UnsafeUnpin for FilterConfig
impl UnwindSafe for FilterConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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