MCPcopy Create free account
hub / github.com/VCVRack/Rack / configBypass

Method configBypass

include/engine/Module.hpp:233–247  ·  view source on GitHub ↗

Adds a direct route from an input to an output when the module is bypassed. Should only be called from a Module subclass's constructor. */

Source from the content-addressed store, hash-verified

231 Should only be called from a Module subclass's constructor.
232 */
233 void configBypass(int inputId, int outputId) {
234 assert(inputId < (int) inputs.size());
235 assert(outputId < (int) outputs.size());
236 // Check that output is not yet routed
237 for (BypassRoute& br : bypassRoutes) {
238 // Prevent unused variable warning for compilers that ignore assert()
239 (void) br;
240 assert(br.outputId != outputId);
241 }
242
243 BypassRoute br;
244 br.inputId = inputId;
245 br.outputId = outputId;
246 bypassRoutes.push_back(br);
247 }
248
249 /** Creates and returns the module's patch storage directory path.
250 Do not call this method in process() since filesystem operations block the audio thread.

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected