MCPcopy Create free account
hub / github.com/csound/csound / aperf

Method aperf

examples/plugin/opcodes.cpp:104–115  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

102 }
103
104 int aperf() {
105 csnd::Vector<MYFLT> &out = outargs.vector_data<MYFLT>(0);
106 csnd::Vector<MYFLT> &in = inargs.vector_data<MYFLT>(0);
107 // copy each a-var ksmps vector in turn
108 // NB: copying the whole memory block
109 // from in.begin() to in.end() also works
110 for (int i = 0; i < in.len(); i++)
111 std::copy(in.begin() + i * in.elem_offset(),
112 in.begin() + (i + 1) * in.elem_offset(),
113 out.begin() + i * in.elem_offset());
114 return OK;
115 }
116};
117
118/** i-time string plugin opcode example

Callers

nothing calls this directly

Calls 3

elem_offsetMethod · 0.80
lenMethod · 0.45
beginMethod · 0.45

Tested by

no test coverage detected