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

Method Process

Source/Inverter.cpp:46–67  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46void Inverter::Process(double time)
47{
48 PROFILER(Inverter);
49
50 SyncBuffers();
51
52 IAudioReceiver* target = GetTarget();
53
54 if (target)
55 {
56 ChannelBuffer* out = target->GetBuffer();
57 for (int ch = 0; ch < GetBuffer()->NumActiveChannels(); ++ch)
58 {
59 if (mEnabled)
60 Mult(GetBuffer()->GetChannel(ch), -1, out->BufferSize());
61 Add(out->GetChannel(ch), GetBuffer()->GetChannel(ch), out->BufferSize());
62 GetVizBuffer()->WriteChunk(GetBuffer()->GetChannel(ch), GetBuffer()->BufferSize(), ch);
63 }
64 }
65
66 GetBuffer()->Reset();
67}
68
69void Inverter::DrawModule()
70{

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected