Method
apply_eq
(&mut self, ch: usize, sample: f32, eq: AudioEq)
Source from the content-addressed store, hash-verified
| 245 | sample = sample * (1.0 - (echo_wet + reverb_wet * 0.5).min(0.45)) |
| 246 | + echo_sample * echo_wet * 0.45 |
| 247 | + reverb_sample * reverb_wet * 0.35; |
| 248 | } else { |
| 249 | self.wet_active = false; |
| 250 | } |
| 251 | |
| 252 | sample = apply_compression(sample, params.compression); |
| 253 | sample *= 1.0 - params.occlusion.clamp(0.0, 1.0) * 0.45; |
| 254 | |
| 255 | self.channel_index += 1; |
| 256 | if self.channel_index >= self.channels { |
| 257 | self.channel_index = 0; |
| 258 | } |
| 259 | |
| 260 | Some(sample.clamp(-1.0, 1.0)) |
| 261 | } |
| 262 | } |
Tested by
no test coverage detected