On 02/27, Hermann Meyer wrote:
>
> I always implement the bypass switch in C/C++.
and I guess this makes sense, but
> When using select2 in
> faust, always both path been processed. That means, even when you switch
> into bypass, the CPU load will stay the same.
Not really, only with -sts / --strict-select option.
For example,
process = select2(_,
ffunction(float func0(), "",""),
ffunction(float func1(), "",""));
compiles to
for (int i0 = 0; i0 < count; i0 = i0 + 1) {
output0[i0] = FAUSTFLOAT(((int(float(input0[i0]))) ? func1() :
func0()));
}
while "faust -sts" generates the "strict" code:
for (int i0 = 0; i0 < count; i0 = i0 + 1) {
float fThen0 = func0();
float fElse0 = func1();
output0[i0] = FAUSTFLOAT(((int(float(input0[i0]))) ? fElse0 :
fThen0));
}
Oleg.
_______________________________________________
Faudiostream-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/faudiostream-users