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

Method GetChannel

Source/ChannelBuffer.cpp:71–84  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

69}
70
71float* ChannelBuffer::GetChannel(int channel)
72{
73 if (channel >= mActiveChannels)
74 ofLog() << "error: requesting a higher channel index than we have active";
75 float* ret = mBuffers[MIN(channel, mActiveChannels - 1)];
76 if (ret == nullptr)
77 {
78 assert(mOwnsBuffers);
79 ret = new float[BufferSize()];
80 ::Clear(ret, BufferSize());
81 mBuffers[MIN(channel, mActiveChannels - 1)] = ret;
82 }
83 return ret;
84}
85
86void ChannelBuffer::Clear() const
87{

Callers 15

ProcessMethod · 0.80
ProcessAudioMethod · 0.80
ProcessMethod · 0.80
ProcessMethod · 0.80
ProcessAudioMethod · 0.80
ProcessMethod · 0.80
ProcessMethod · 0.80
ProcessAudioMethod · 0.80
ProcessMethod · 0.80
DrawModuleMethod · 0.80
ProcessMethod · 0.80
ProcessMethod · 0.80

Calls 2

ofLogClass · 0.85
ClearFunction · 0.85

Tested by 1

ProcessMethod · 0.64