MCPcopy Create free account
hub / github.com/PerroEngine/Perro / process

Method process

perro_source/audio_stack/perro_pawdio/src/dsp.rs:298–306  ·  view source on GitHub ↗
(&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

Callers 1

nextMethod · 0.80

Calls 2

clampMethod · 0.45
lenMethod · 0.45

Tested by

no test coverage detected