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

Method construct_processor

crates/firewheel-nodes/src/freeverb/mod.rs:112–153  ·  view source on GitHub ↗
(
        &self,
        _: &Self::Configuration,
        cx: ConstructProcessorContext,
    )

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 4

clampMethod · 0.80
maskMethod · 0.80
apply_parametersMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected