pub trait AudioFilter: Send {
// Required method
fn process(&mut self, frame: &mut [f32]);
// Provided methods
fn reconfigure(&mut self, _config: &Value) -> bool { ... }
fn reset(&mut self) { ... }
}Expand description
A running filter instance. The player builds one instance per deck (so two
exist during a crossfade), and may call FilterFactory::create once more
just to validate a configuration.
process runs on the real-time send path every 20 ms: it must not block,
allocate heavily or do I/O.
Required Methods§
Provided Methods§
Sourcefn reconfigure(&mut self, _config: &Value) -> bool
fn reconfigure(&mut self, _config: &Value) -> bool
A new configuration arrived for an already running filter. Return
false to have the player rebuild the filter from the factory instead.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".