Closed giuliomoro closed 3 years ago
@brianlheim what is a good way (if any) for a UGen to remove itself from the processing graph (e.g.: when an invalid setting is detected and there is no point in keep calling the callback)?
I see things like Unit_DoneAction
or Unit_EndCalc
or Unit::mDone
, but it seems like the former is never called and the latter is never checked ...
i am not an expert by any means, but it looks like most UGens which fail to properly initialize set their calc function as ClearUnitOutputs: https://github.com/supercollider/supercollider/blob/develop/server/plugins/FFT_UGens.cpp#L175
yes that's what I had observed, too ... I will try to ask on the supercollider GH, thanks
c6b8024d6289accbfa4ce2e46b59aecb2497d424 will take care of this, but currently it is just a draft. Will amend and rebase tomorrow I think
or they'll segfault.
This is stated, e.g.: here. The current behaviour of all the analog Bela UGens and some of the digital ones is that if there is some invalid setting at
Ctor
,SETCALC()
is never called, so it will then segfault inSC_Graph.cpp
whenis called.
There is something else about initialising the output value (i.e.: what is the first output to output?), which is a discussion started at the issue above and continued here. This is less crucial in a way (no crash, at most a click at startup).