]> Nishi Git Mirror - gwion.git/commitdiff
:art: Update trig test
authorfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 11 Oct 2019 20:45:31 +0000 (22:45 +0200)
committerfennecdjay <astor.jeremie@wanadoo.fr>
Fri, 11 Oct 2019 20:45:31 +0000 (22:45 +0200)
tests/import/trig.c
tests/import/trig.gw

index 6fb1c9311aa065514deb8878914560162dc376ab..c33ef532e9e9ed2644d8211d042c516cbf25e568 100644 (file)
@@ -25,9 +25,18 @@ static CTOR(trig_ctor) {
   ugen_gen(shred->info->vm->gwion, UGEN(o), trig_tick, (void*)1, 1);
 }
 
+static CTOR(trig2_ctor) {
+  ugen_ini(shred->info->vm->gwion, UGEN(o), 2, 2);
+  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))
+  const Type t_trig = gwi_mk_type(gwi, "Trig", SZ_INT, "UGen");
+  GWI_BB(gwi_class_ini(gwi, t_trig, trig_ctor, NULL))
+  gwi_class_end(gwi);
+
+  const Type t_trig2 = gwi_mk_type(gwi, "Trig2", SZ_INT, "UGen");
+  GWI_BB(gwi_class_ini(gwi, t_trig2, trig2_ctor, NULL))
   return gwi_class_end(gwi);
 }
index 104dcf3b459165ba5c44fbb17d174e452639434b..c56299b343e3c28bc5466e1d7aae691e43fd3ec8 100644 (file)
@@ -1,3 +1,9 @@
 Trig trig => dac;
 adc :=> trig;
-adc :=<trig;
+adc :=< trig;
+
+Trig2 trig2 => dac;
+adc :=> trig2;
+adc :=< trig2;
+
+samp => now;