(
&self,
_: &Self::Configuration,
cx: ConstructProcessorContext,
)
| 110 | })) |
| 111 | // TODO: If and when the scheduler gets proper in-place processing support, use |
| 112 | // in-place processing for this node. |
| 113 | } |
| 114 | |
| 115 | fn construct_processor( |
| 116 | &self, |
| 117 | _: &Self::Configuration, |
| 118 | cx: ConstructProcessorContext, |
| 119 | ) -> Result<impl AudioNodeProcessor, NodeError> { |
| 120 | let freeverb = freeverb::Freeverb::new(cx.stream_info.sample_rate.get() as usize); |
| 121 | let smoother_config = SmootherConfig { |
| 122 | smooth_seconds: self.smooth_seconds, |
| 123 | ..Default::default() |
| 124 | }; |
| 125 | |
| 126 | let mut processor = FreeverbProcessor { |
| 127 | freeverb, |
| 128 | damping: SmoothedParam::new( |
| 129 | self.damping.clamp(0.0, 1.0), |
| 130 | 1.0, |
| 131 | smoother_config, |
| 132 | cx.stream_info.sample_rate, |
| 133 | ), |
| 134 | width: SmoothedParam::new( |
| 135 | self.width.clamp(0.0, 1.0), |
| 136 | 1.0, |
| 137 | smoother_config, |
| 138 | cx.stream_info.sample_rate, |
| 139 | ), |
| 140 | room_size: SmoothedParam::new( |
| 141 | self.room_size.clamp(0.0, 1.0), |
| 142 | 1.0, |
| 143 | smoother_config, |
| 144 | cx.stream_info.sample_rate, |
| 145 | ), |
| 146 | paused: self.pause, |
| 147 | pause_declicker: if self.pause { |
| 148 | Declicker::SettledAt0 |
| 149 | } else { |
| 150 | Declicker::SettledAt1 |
| 151 | }, |
| 152 | values: DeclickValues::new(cx.stream_info.declick_frames), |
| 153 | coeff_update_mask: self.coeff_update_factor.mask(), |
| 154 | prev_output_was_silent: true, |
| 155 | }; |
| 156 |
nothing calls this directly
no test coverage detected