Method
process
(&mut self, _channel: usize, input: f32, wet: f32)
Source from the content-addressed store, hash-verified
| 296 | self.reverb_b |
| 297 | .get_or_insert_with(|| DelayLine::new(delay_len(sample_rate, channels, 0.071), 0.54)); |
| 298 | } |
| 299 | |
| 300 | fn apply_low_pass(&mut self, ch: usize, sample: f32, amount: f32) -> f32 { |
| 301 | if amount <= 0.001 { |
| 302 | self.low_state[ch] = sample; |
| 303 | return sample; |
| 304 | } |
| 305 | let alpha = (1.0 - amount.clamp(0.0, 0.98)).powi(2).max(0.015); |
| 306 | self.low_state[ch] += (sample - self.low_state[ch]) * alpha; |
| 307 | self.low_state[ch] |
| 308 | } |
| 309 | |
Tested by
no test coverage detected