bool32.rising wait
bool32.rising stop
frac32.positive pos
frac32.positive sync position
bool32.pulse sync trigger
bool32 wait
int shift;
bool wait;
shift = 1 << 18;
int csample = inlet_pos;
int spos = inlet_start;
if (inlet_wait && !wait)
wait = 1;
if (wait && ((csample > (spos - shift)) && (csample < (spos + shift)))) {
outlet_trig = 1;
wait = 0;
} else
outlet_trig = 0;
if (wait && inlet_stop)
wait = 0;
outlet_wait = wait;