(
&self,
config: &Self::Configuration,
cx: ConstructProcessorContext,
)
| 141 | // in-place processing for this node. |
| 142 | } |
| 143 | |
| 144 | fn construct_processor( |
| 145 | &self, |
| 146 | config: &Self::Configuration, |
| 147 | cx: ConstructProcessorContext, |
| 148 | ) -> Result<impl AudioNodeProcessor, NodeError> { |
| 149 | let min_gain = self.min_gain.max(0.0); |
| 150 | let gain = self.volume.amp_clamped(min_gain); |
| 151 | |
| 152 | Ok(VolumeProcessor { |
| 153 | gain: SmoothedParam::new( |
| 154 | gain, |
| 155 | DEFAULT_GAIN_SPAN, |
| 156 | SmootherConfig { |
| 157 | smooth_seconds: self.smooth_seconds, |
| 158 | ..Default::default() |
| 159 | }, |
| 160 | cx.stream_info.sample_rate, |
| 161 | ), |
| 162 | min_gain, |
| 163 | num_channels: config.channels.get().get() as usize, |
| 164 | prev_input_settled: true, |
| 165 | }) |
| 166 | } |
nothing calls this directly
no test coverage detected