MCPcopy Create free account
hub / github.com/LabSound/LabSound / connect

Method connect

src/core/AudioContext.cpp:421–432  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

419
420
421void AudioContext::connect(std::shared_ptr<AudioNode> destination, std::shared_ptr<AudioNode> source, int destIdx, int srcIdx)
422{
423 if (!destination)
424 throw std::runtime_error("Cannot connect to null destination");
425 if (!source)
426 throw std::runtime_error("Cannot connect from null source");
427 if (srcIdx > source->numberOfOutputs())
428 throw std::out_of_range("Output index greater than available outputs");
429 if (destIdx > destination->numberOfInputs())
430 throw std::out_of_range("Input index greater than available inputs");
431 m_internal->pendingNodeConnections.enqueue({ConnectionOperationKind::Connect, destination, source, destIdx, srcIdx});
432}
433
434void AudioContext::disconnect(std::shared_ptr<AudioNode> destination, std::shared_ptr<AudioNode> source, int destIdx, int srcIdx)
435{

Callers

nothing calls this directly

Calls 2

numberOfOutputsMethod · 0.80
numberOfInputsMethod · 0.80

Tested by

no test coverage detected