We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 48caf24 commit 56c6732Copy full SHA for 56c6732
src/analysis.rs
@@ -246,7 +246,7 @@ impl Analyser {
246
assert_valid_decibels(min, max);
247
248
self.min_decibels = min;
249
- self.min_decibels = max;
+ self.max_decibels = max;
250
}
251
252
pub fn frequency_bin_count(&self) -> usize {
@@ -595,6 +595,14 @@ mod tests {
595
596
597
598
+ #[test]
599
+ fn test_set_decibels() {
600
+ let mut analyser = Analyser::new();
601
+ analyser.set_decibels(-20., 10.);
602
+ assert_eq!(analyser.min_decibels(), -20.);
603
+ assert_eq!(analyser.max_decibels(), 10.);
604
+ }
605
+
606
#[test]
607
#[should_panic]
608
fn test_fft_size_constraints_power_of_two() {
0 commit comments