MCPcopy Create free account
hub / github.com/christophhart/HISE / copyToWorkBuffer

Method copyToWorkBuffer

hi_scripting/scripting/api/ScriptingApiObjects.cpp:7607–7635  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7605}
7606
7607void ScriptingObjects::ScriptFFT::copyToWorkBuffer(var inputData, int offset, int channel)
7608{
7609 if (auto a = inputData.getArray())
7610 {
7611 if (channel != 0)
7612 {
7613 reportScriptError("Illegal nested arrays");
7614 }
7615
7616 for (auto& b : *a)
7617 {
7618 copyToWorkBuffer(b, offset, channel);
7619 channel++;
7620 }
7621 }
7622 else if (auto b = inputData.getBuffer())
7623 {
7624 if (auto dst = scratchBuffers[channel].chunkInput)
7625 {
7626 dst->clear();
7627 int numToCopy = jmin(b->size - offset, maxNumSamples);
7628 dst->buffer.copyFrom(0, 0, b->buffer, 0, offset, numToCopy);
7629 }
7630 else
7631 {
7632 reportScriptError("channel mismatch");
7633 }
7634 }
7635}
7636
7637void ScriptingObjects::ScriptFFT::copyFromWorkBuffer(int offset, int channel)
7638{

Callers

nothing calls this directly

Calls 5

jminFunction · 0.85
getArrayMethod · 0.45
getBufferMethod · 0.45
clearMethod · 0.45
copyFromMethod · 0.45

Tested by

no test coverage detected