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

Method construct_processor

crates/firewheel-nodes/src/delay_compensation.rs:59–77  ·  view source on GitHub ↗
(
        &self,
        config: &Self::Configuration,
        _cx: ConstructProcessorContext,
    )

Source from the content-addressed store, hash-verified

57 }
58
59 fn construct_processor(
60 &self,
61 config: &Self::Configuration,
62 _cx: ConstructProcessorContext,
63 ) -> Result<impl AudioNodeProcessor, NodeError> {
64 let channels = config.channels.get().get() as usize;
65 let buffer_len = channels * config.delay_frames;
66
67 let mut buffer: Vec<f32> = Vec::new();
68 buffer.reserve_exact(buffer_len);
69 buffer.resize(buffer_len, 0.0);
70
71 Ok(Processor {
72 buffer,
73 delay_frames: config.delay_frames,
74 ptr: 0,
75 num_silent_frames_per_channel: smallvec![config.delay_frames; channels],
76 })
77 }
78}
79
80struct Processor {

Callers

nothing calls this directly

Calls 2

getMethod · 0.45
resizeMethod · 0.45

Tested by

no test coverage detected