Asynchronous normal distribution generation */
| 310 | Asynchronous normal distribution generation |
| 311 | */ |
| 312 | struct 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 | |
| 335 | struct Gaussian : csnd::Plugin<1, 3> { |
| 336 | std::normal_distribution<MYFLT> norm; |
nothing calls this directly
no outgoing calls
no test coverage detected