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

Function Port_step

src/override/Engine.cpp:163–182  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

161
162#ifndef HEADLESS
163static void Port_step(Port* that, float deltaTime) {
164 // Set plug lights
165 if (that->channels == 0) {
166 that->plugLights[0].setBrightness(0.f);
167 that->plugLights[1].setBrightness(0.f);
168 that->plugLights[2].setBrightness(0.f);
169 }
170 else if (that->channels == 1) {
171 float v = that->getVoltage() / 10.f;
172 that->plugLights[0].setSmoothBrightness(-v, deltaTime);
173 that->plugLights[1].setSmoothBrightness(v, deltaTime);
174 that->plugLights[2].setBrightness(0.f);
175 }
176 else {
177 float v = that->getVoltageRMS() / 10.f;
178 that->plugLights[0].setBrightness(0.f);
179 that->plugLights[1].setBrightness(0.f);
180 that->plugLights[2].setSmoothBrightness(v, deltaTime);
181 }
182}
183#endif
184
185

Callers 2

Module__doProcessFunction · 0.85

Calls 4

setBrightnessMethod · 0.80
setSmoothBrightnessMethod · 0.80
getVoltageMethod · 0.45
getVoltageRMSMethod · 0.45

Tested by

no test coverage detected