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

Class AsyncGauss

examples/plugin/opcodes.cpp:312–333  ·  view source on GitHub ↗

Asynchronous normal distribution generation */

Source from the content-addressed store, hash-verified

310 Asynchronous normal distribution generation
311 */
312struct AsyncGauss : csnd::Plugin<1, 2> {
313 MyThread t;
314 MYFLT res;
315
316 int init() {
317 csound->plugin_deinit(this);
318 csnd::constr(&t, csound, inargs[0], inargs[1], &res);
319 return OK;
320 }
321
322 int deinit() {
323 t.stop();
324 t.join();
325 csnd::destr(&t);
326 return OK;
327 }
328
329 int kperf() {
330 outargs[0] = res;
331 return OK;
332 }
333};
334
335struct Gaussian : csnd::Plugin<1, 3> {
336 std::normal_distribution<MYFLT> norm;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected