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

Method construct_processor

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

Source from the content-addressed store, hash-verified

161 // in-place processing for this node.
162 }
163
164 fn construct_processor(
165 &self,
166 _config: &Self::Configuration,
167 cx: ConstructProcessorContext,
168 ) -> Result<impl AudioNodeProcessor, NodeError> {
169 let min_gain = self.min_gain.max(0.0);
170
171 let (gain_l, gain_r) = self.compute_gains(self.min_gain);
172
173 Ok(Processor {
174 gain_l: SmoothedParam::new(
175 gain_l,
176 DEFAULT_GAIN_SPAN,
177 SmootherConfig {
178 smooth_seconds: self.smooth_seconds,
179 ..Default::default()
180 },
181 cx.stream_info.sample_rate,
182 ),
183 gain_r: SmoothedParam::new(
184 gain_r,
185 DEFAULT_GAIN_SPAN,
186 SmootherConfig {
187 smooth_seconds: self.smooth_seconds,
188 ..Default::default()
189 },
190 cx.stream_info.sample_rate,
191 ),
192 params: *self,
193 min_gain,
194 prev_input_settled: true,
195 })

Callers

nothing calls this directly

Calls 2

maxMethod · 0.80
compute_gainsMethod · 0.45

Tested by

no test coverage detected