Skip to content

Commit

Permalink
Add slew coefficients for multiple sample rates
Browse files Browse the repository at this point in the history
  • Loading branch information
davemollen committed Oct 10, 2024
1 parent 5edc7da commit f465997
Show file tree
Hide file tree
Showing 3 changed files with 463 additions and 105 deletions.
4 changes: 2 additions & 2 deletions rat/src/clipper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ pub struct Clipper {
}

impl Clipper {
pub fn new() -> Self {
pub fn new(sample_rate: f32) -> Self {
Self {
upsample_fir: FirFilter::new(SlewCoefficients::new()),
upsample_fir: FirFilter::new(SlewCoefficients::new(sample_rate)),
downsample_fir: FirFilter::new(Coefficients::new()),
}
}
Expand Down
Loading

0 comments on commit f465997

Please sign in to comment.