frac32buffer in
frac32.positive rate
frac32.positive mask
frac32buffer out
int32 rate
int32 mask
int sample;
int counter;
int mask;
counter = 0;
mask = 0;
if (counter >= (param_rate + (inlet_rate >> 21) - mask)) {
counter = -1;
mask = mask + 1;
sample = inlet_in;
}
if (mask >= (param_mask + (inlet_mask >> 21)))
mask = 0;
counter = counter + 1;
outlet_out = sample;