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

Method construct_processor

crates/firewheel-nodes/src/volume.rs:143–163  ·  view source on GitHub ↗
(
        &self,
        config: &Self::Configuration,
        cx: ConstructProcessorContext,
    )

Source from the content-addressed store, hash-verified

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 }

Callers

nothing calls this directly

Calls 3

maxMethod · 0.80
amp_clampedMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected