From: fennecdjay Date: Fri, 11 Oct 2019 20:19:31 +0000 (+0200) Subject: :art: Test fork_join2 longer X-Git-Tag: nightly~2171 X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=1526ac5a15e275499f22900ba0b4fa8993d0a606;p=gwion.git :art: Test fork_join2 longer --- diff --git a/src/lib/ugen.c b/src/lib/ugen.c index 60301771..ec1c841f 100644 --- a/src/lib/ugen.c +++ b/src/lib/ugen.c @@ -362,6 +362,6 @@ GWION_IMPORT(ugen) { _CHECK_OP("=>", chuck_ugen, UgenConnect) _CHECK_OP("=<", chuck_ugen, UgenDisconnect) _CHECK_OP(":=>", chuck_ugen, TrigConnect) - _CHECK_OP("}=<", chuck_ugen, TrigDisconnect) + _CHECK_OP(":=<", chuck_ugen, TrigDisconnect) return import_global_ugens(gwi); } diff --git a/tests/import/trig.c b/tests/import/trig.c new file mode 100644 index 00000000..6fb1c931 --- /dev/null +++ b/tests/import/trig.c @@ -0,0 +1,33 @@ +#include +#include +#include "gwion_util.h" +#include "gwion_ast.h" +#include "oo.h" +#include "env.h" +#include "vm.h" +#include "gwion.h" +#include "type.h" +#include "instr.h" +#include "object.h" +#include "value.h" +#include "operator.h" +#include "import.h" +#include "ugen.h" +#include "func.h" +#include "gwi.h" + +static TICK(trig_tick) { + u->out = u->module.gen.trig->in ? u->in : 0; +} + +static CTOR(trig_ctor) { + ugen_ini(shred->info->vm->gwion, UGEN(o), 1, 1); + ugen_gen(shred->info->vm->gwion, UGEN(o), trig_tick, (void*)1, 1); +} + + +GWION_IMPORT(trig) { + const Type t_gain = gwi_mk_type(gwi, "Trig", SZ_INT, "UGen"); + GWI_BB(gwi_class_ini(gwi, t_gain, trig_ctor, NULL)) + return gwi_class_end(gwi); +} diff --git a/tests/import/trig.gw b/tests/import/trig.gw new file mode 100644 index 00000000..104dcf3b --- /dev/null +++ b/tests/import/trig.gw @@ -0,0 +1,3 @@ +Trig trig => dac; +adc :=> trig; +adc :=>>; second => now; } @=> Fork @f; +fork { <<< __func__ >>>; minute => now; } @=> Fork @f; f.join();