Construct the realtime processor counterpart using the given information about the audio stream. This method is called before the node processor is sent to the realtime thread, so it is safe to do non-realtime things here like allocating.
(
&self,
config: &Self::Configuration,
_cx: ConstructProcessorContext,
)
| 79 | // This method is called before the node processor is sent to the realtime |
| 80 | // thread, so it is safe to do non-realtime things here like allocating. |
| 81 | fn construct_processor( |
| 82 | &self, |
| 83 | config: &Self::Configuration, |
| 84 | _cx: ConstructProcessorContext, |
| 85 | ) -> Result<impl AudioNodeProcessor, NodeError> { |
| 86 | // Seed cannot be zero. |
| 87 | let seed = if config.seed == 0 { 17 } else { config.seed }; |
| 88 | |
| 89 | Ok(Processor { |
| 90 | fpd: seed, |
| 91 | gain: self.volume.amp_clamped(DEFAULT_MIN_AMP), |
| 92 | params: *self, |
| 93 | }) |
| 94 | } |
| 95 | } |
| 96 | |
| 97 | // The realtime processor counterpart to your node. |
nothing calls this directly
no test coverage detected