pub struct Crossfeed { /* private fields */ }Expand description
Bauer crossfeed processor
Uses a 2nd-order Butterworth high-pass filter for the crossfeed path. Implementation uses Direct Form II Transposed for numerical stability.
Implementations§
Source§impl Crossfeed
impl Crossfeed
Sourcepub fn new(sample_rate: f64) -> Self
pub fn new(sample_rate: f64) -> Self
Create a new crossfeed processor with default settings
Default: 700Hz cutoff, 0.35 crossfeed amount
Sourcepub fn with_params(sample_rate: f64, cutoff_hz: f64, mix: f64) -> Self
pub fn with_params(sample_rate: f64, cutoff_hz: f64, mix: f64) -> Self
Create with custom parameters
§Arguments
sample_rate- Audio sample rate in Hzcutoff_hz- HPF cutoff frequency (600-900 Hz typical)mix- Crossfeed amount (0.0 - 1.0, 0.3-0.45 typical)
Sourcepub fn set_sample_rate(&mut self, sample_rate: f64, cutoff_hz: f64)
pub fn set_sample_rate(&mut self, sample_rate: f64, cutoff_hz: f64)
Update sample rate and recalculate HPF coefficients This is critical when playing files with different sample rates (e.g., 44.1kHz vs 192kHz) to maintain correct cutoff frequency.
Sourcepub fn set_enabled(&mut self, enabled: bool)
pub fn set_enabled(&mut self, enabled: bool)
Set enabled state
Sourcepub fn process(&mut self, samples: &mut [f64], channels: usize)
pub fn process(&mut self, samples: &mut [f64], channels: usize)
Process interleaved stereo samples in-place
Only processes if channels == 2 (stereo). Mono and multi-channel pass through.
Sourcepub fn get_settings(&self) -> CrossfeedSettings
pub fn get_settings(&self) -> CrossfeedSettings
Get current settings
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Crossfeed
impl RefUnwindSafe for Crossfeed
impl Send for Crossfeed
impl Sync for Crossfeed
impl Unpin for Crossfeed
impl UnsafeUnpin for Crossfeed
impl UnwindSafe for Crossfeed
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
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>
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