All_inputs/outputs_unpatched not working

Maybe I’m testing it incorrectly, but I’m unable to get anything from these functions.

I’ve tried turning on panel LEDs and printing to console, but nothing shows up.

The other jack-detect functions are working great, btw.

These are called when a module is added to an existing (running) patch, and on every module when the patch is first loaded. After that, only the single jack versions are used when cables change.

I might remove these from the API in v3.x, as I don’t see much use for them anymore and they’re only called right after the constructor… If the module constructor inits everything cleanly, then you can just omit these functions and the no-op version in the base class will be invoked.

1 Like

Hmm, I assumed I’d see something happen after loading a module. Perhaps it happens even before my context is ready and its message queue can receive anything.

I also don’t fully see how these could be used, but I figured I’d try to implement them anyway.

If you think they will be removed I’ll get ahead of this and just not have them :wink:

They were basically an idea for what hindsight proves was a premature optimization: letting you do a fast memset(all_ins, 0, num_ins) instead of a handful of virtual function calls to zero-out each jack.
In practice, they only get called at times when memory is being allocated anyways (so the optimization is a drop in the bucket). And they’re only called when the module is newly constructed, so it’s cleaner to put the zero-ing out in the initializer rather than explicitly do it in a virtual function.
So yeah, best to just ignore them.

1 Like