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

Method Process

Source/Beats.cpp:63–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void Beats::Process(double time)
64{
65 PROFILER(Beats);
66
67 IAudioReceiver* target = GetTarget();
68 if (!mEnabled || target == nullptr)
69 return;
70
71 int numChannels = 2;
72
73 ComputeSliders(0);
74 SyncOutputBuffer(numChannels);
75 mWriteBuffer.SetNumActiveChannels(numChannels);
76
77 int bufferSize = target->GetBuffer()->BufferSize();
78 assert(bufferSize == gBufferSize);
79
80 mWriteBuffer.Clear();
81
82 for (BeatColumn* column : mBeatColumns)
83 column->Process(time, &mWriteBuffer, bufferSize);
84
85 for (int ch = 0; ch < mWriteBuffer.NumActiveChannels(); ++ch)
86 {
87 GetVizBuffer()->WriteChunk(mWriteBuffer.GetChannel(ch), mWriteBuffer.BufferSize(), ch);
88 Add(target->GetBuffer()->GetChannel(ch), mWriteBuffer.GetChannel(ch), gBufferSize);
89 }
90}
91
92void Beats::DropdownClicked(DropdownList* list)
93{

Callers 5

OnTransportAdvancedMethod · 0.45
ProcessAudioMethod · 0.45
ProcessAudioMethod · 0.45
AudioOutMethod · 0.45
ProcessAudioMethod · 0.45

Calls 15

AddFunction · 0.85
GetLeftPanGainFunction · 0.85
GetRightPanGainFunction · 0.85
ofMapFunction · 0.85
ofClampFunction · 0.85
SetNumActiveChannelsMethod · 0.80
BufferSizeMethod · 0.80
GetBufferMethod · 0.80
NumActiveChannelsMethod · 0.80
WriteChunkMethod · 0.80
GetChannelMethod · 0.80
LengthInSamplesMethod · 0.80

Tested by

no test coverage detected