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

Method process

src/core/AudioBasicProcessorNode.cpp:47–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void AudioBasicProcessorNode::process(ContextRenderLock & r, int bufferSize)
48{
49 AudioBus * destinationBus = output(0)->bus(r);
50
51 if (!isInitialized() || !processor())
52 destinationBus->zero();
53 else
54 {
55 AudioBus * sourceBus = input(0)->bus(r);
56
57 // FIXME: if we take "tail time" into account, then we can avoid calling processor()->process() once the tail dies down.
58 if (!input(0)->isConnected())
59 {
60 sourceBus->zero();
61 return;
62 }
63
64 int srcChannelCount = sourceBus->numberOfChannels();
65 int dstChannelCount = destinationBus->numberOfChannels();
66 if (srcChannelCount != dstChannelCount)
67 {
68 output(0)->setNumberOfChannels(r, srcChannelCount);
69 destinationBus = output(0)->bus(r);
70 }
71
72 // process entire buffer
73 processor()->process(r, sourceBus, destinationBus, bufferSize);
74 }
75}
76
77
78void AudioBasicProcessorNode::reset(ContextRenderLock &)

Callers

nothing calls this directly

Calls 5

busMethod · 0.45
zeroMethod · 0.45
isConnectedMethod · 0.45
numberOfChannelsMethod · 0.45
setNumberOfChannelsMethod · 0.45

Tested by

no test coverage detected