MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / Cable_step

Function Cable_step

src/override/Engine.cpp:143–159  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

141
142
143static void Cable_step(Cable* that) {
144 Output* output = &that->outputModule->outputs[that->outputId];
145 Input* input = &that->inputModule->inputs[that->inputId];
146 // Match number of polyphonic channels to output port
147 const int channels = output->channels;
148 // Copy all voltages from output to input
149 for (int c = 0; c < channels; c++) {
150 if (!std::isfinite(output->voltages[c]))
151 __builtin_unreachable();
152 input->voltages[c] = output->voltages[c];
153 }
154 // Set higher channel voltages to 0
155 for (int c = channels; c < input->channels; c++) {
156 input->voltages[c] = 0.f;
157 }
158 input->channels = channels;
159}
160
161
162#ifndef HEADLESS

Callers 2

Engine_stepFrameFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected