#![warn(missing_docs)]
#![no_std]
#![cfg_attr(RUSTC_IS_NIGHTLY, feature(float_algebraic))]
#[macro_use]
extern crate alloc;
#[macro_use]
extern crate tracing;
pub use num_complex;
pub use num_traits;
pub use decimating_fir::DecimatingFirFilter;
pub use fir::FirFilter;
pub use iir::IirFilter;
pub use polyphase_resampling_fir::PolyphaseResamplingFir;
pub use rotator::Rotator;
pub use taps::Taps;
mod decimating_fir;
mod fir;
pub mod firdes;
pub mod iir;
pub mod math;
mod polyphase_resampling_fir;
pub mod rotator;
pub mod taps;
pub mod windows;
#[derive(PartialEq, Eq, Clone, Copy, Debug)]
pub enum ComputationStatus {
InsufficientInput,
InsufficientOutput,
BothSufficient,
}
pub trait Filter<InputType, OutputType, TapType> {
fn filter(
&self,
input: &[InputType],
output: &mut [OutputType],
) -> (usize, usize, ComputationStatus);
fn length(&self) -> usize;
}
pub trait StatefulFilter<InputType, OutputType, TapType> {
fn filter(
&mut self,
input: &[InputType],
output: &mut [OutputType],
) -> (usize, usize, ComputationStatus);
fn length(&self) -> usize;
}
pub mod prelude {
pub use num_traits;
pub use super::ComputationStatus;
pub use super::Filter;
pub use super::StatefulFilter;
pub use super::Taps;
}