int32 samples in
int32.positive multiplier.defaults to 1.
bool32.rising reset phase
frac32.positive phase
uint32_t Phase;
uint64_t freq;
uint32_t r;
uint8_t mul;
Phase = 0;
r = 1;
mul = (inlet_mul > 0) ? inlet_mul : 1;
freq = (int)(281474976710656.f / (inlet_smps * (128 << 3)));
if (inlet_reset && r) {
Phase = 0;
r = 0;
} else {
if (!inlet_reset)
r = 1;
Phase += freq >> 2;
}
outlet_wave = ((Phase >> 5) * mul) & ((1 << 27) - 1);