frac32 g1
frac32 g2
frac32 g3
frac32buffer in1
frac32buffer in2
frac32buffer in3
frac32buffer mix out
bool i1, i2, i3;
int32_t g1, g2, g3;
i1 = i2 = i3 = false;
g1 = g2 = g3 = 0;
for (int i = 0; i < BUFSIZE; i++) {
int32_t in = inlet_in1[i];
bool ic = in > 0;
if (i1 != ic)
g1 = inlet_g1;
i1 = ic;
outlet_out[i] = ___SMMUL(in, g1);
}
for (int i = 0; i < BUFSIZE; i++) {
int32_t in = inlet_in2[i];
bool ic = in > 0;
if (i2 != ic)
g2 = inlet_g2;
i1 = ic;
outlet_out[i] = ___SMMLA(in, g2, outlet_out[i]);
}
for (int i = 0; i < BUFSIZE; i++) {
int32_t in = inlet_in3[i];
bool ic = in > 0;
if (i3 != ic)
g3 = inlet_g3;
i1 = ic;
outlet_out[i] = ___SMMLA(in, g3, outlet_out[i]) << 5;
}