MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / Process

Method Process

Source/Rewriter.cpp:85–109  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85void Rewriter::Process(double time)
86{
87 PROFILER(Rewriter);
88
89 IAudioReceiver* target = GetTarget();
90
91 if (target == nullptr)
92 return;
93
94 SyncBuffers();
95 mRecordBuffer.SetNumChannels(GetBuffer()->NumActiveChannels());
96
97 int bufferSize = GetBuffer()->BufferSize();
98
99 for (int ch = 0; ch < GetBuffer()->NumActiveChannels(); ++ch)
100 {
101 mRecordBuffer.WriteChunk(GetBuffer()->GetChannel(ch), bufferSize, ch);
102
103 Add(target->GetBuffer()->GetChannel(ch), GetBuffer()->GetChannel(ch), bufferSize);
104
105 GetVizBuffer()->WriteChunk(GetBuffer()->GetChannel(ch), bufferSize, ch);
106 }
107
108 GetBuffer()->Reset();
109}
110
111void Rewriter::DrawModule()
112{

Callers

nothing calls this directly

Calls 8

AddFunction · 0.85
SetNumChannelsMethod · 0.80
NumActiveChannelsMethod · 0.80
BufferSizeMethod · 0.80
WriteChunkMethod · 0.80
GetChannelMethod · 0.80
GetBufferMethod · 0.80
ResetMethod · 0.45

Tested by

no test coverage detected