Skip to content

Commit

Permalink
Added comments
Browse files Browse the repository at this point in the history
  • Loading branch information
xwillxw committed Oct 6, 2023
1 parent 926301f commit 4112e55
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/source/blt.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ where
}
}

/// Same as low_pass but allows the q value (bandwidth) to be changed
pub fn low_pass_with_q<I>(input: I, freq: u32, q: f32) -> BltFilter<I>
where
I: Source<Item = f32>,
Expand All @@ -51,6 +52,7 @@ where
}
}

/// Same as low_pass but allows the q value (bandwidth) to be changed
pub fn high_pass_with_q<I>(input: I, freq: u32, q: f32) -> BltFilter<I>
where
I: Source<Item = f32>,
Expand Down Expand Up @@ -90,12 +92,13 @@ impl<I> BltFilter<I> {
self.applier = None;
}

/// Same as to_low_pass but allows the q value (bandwidth) to be changed
pub fn to_low_pass_with_q(&mut self, freq: u32, q: f32) {
self.formula = BltFormula::LowPass { freq, q };
self.applier = None;
}

/// Modifies this filter so that it becomes a high-pass filter
/// Same as to_high_pass but allows the q value (bandwidth) to be changed
pub fn to_high_pass_with_q(&mut self, freq: u32, q: f32) {
self.formula = BltFormula::HighPass { freq, q };
self.applier = None;
Expand Down

0 comments on commit 4112e55

Please sign in to comment.