MCPcopy Create free account
hub / github.com/BillyDM/Firewheel / construct_processor

Method construct_processor

crates/firewheel-nodes/src/spatial_basic.rs:219–253  ·  view source on GitHub ↗
(
        &self,
        _config: &Self::Configuration,
        cx: ConstructProcessorContext,
    )

Source from the content-addressed store, hash-verified

217 // in-place processing for this node.
218 }
219
220 fn construct_processor(
221 &self,
222 _config: &Self::Configuration,
223 cx: ConstructProcessorContext,
224 ) -> Result<impl AudioNodeProcessor, NodeError> {
225 let computed_values = self.compute_values();
226
227 Ok(Processor {
228 gain_l: SmoothedParam::new(
229 computed_values.gain_l,
230 DEFAULT_GAIN_SPAN,
231 SmootherConfig {
232 smooth_seconds: self.smooth_seconds,
233 ..Default::default()
234 },
235 cx.stream_info.sample_rate,
236 ),
237 gain_r: SmoothedParam::new(
238 computed_values.gain_r,
239 DEFAULT_GAIN_SPAN,
240 SmootherConfig {
241 smooth_seconds: self.smooth_seconds,
242 ..Default::default()
243 },
244 cx.stream_info.sample_rate,
245 ),
246 distance_attenuator: DistanceAttenuatorStereoDsp::new(
247 SmootherConfig {
248 smooth_seconds: self.smooth_seconds,
249 ..Default::default()
250 },
251 cx.stream_info.sample_rate,
252 self.coeff_update_factor,
253 ),
254 params: *self,
255 prev_input_settled: true,
256 })

Callers

nothing calls this directly

Calls 1

compute_valuesMethod · 0.45

Tested by

no test coverage detected