| 260 | self.param_counter += 1; |
| 261 | if self.param_counter >= PARAM_REFRESH_SAMPLES { |
| 262 | self.param_counter = 0; |
| 263 | } |
| 264 | let params = self.params; |
| 265 | let ch = self.channel_index.min(self.channels - 1); |
| 266 | let mut sample = input; |
| 267 | |
| 268 | // Unity EQ is an identity passthrough; skip the two filter updates. |
| 269 | if !eq_is_dry(params.eq) { |
| 270 | sample = self.apply_eq(ch, sample, params.eq); |
| 271 | } |
| 272 | sample = self.apply_low_pass(ch, sample, params.low_pass.max(params.occlusion * 0.8)); |
| 273 | |
| 274 | let echo_wet = params.echo.max(params.reflection * 0.35).clamp(0.0, 1.0); |
| 275 | let reverb_wet = params |
| 276 | .reverb_send |
| 277 | .max(params.reflection * 0.25) |
| 278 | .clamp(0.0, 1.0); |