Open hemmer opened 2 years ago
Fix with unacceptable performance hit posted here. It is due to the 1-sample delay at least.
I haven't checked Muxlicer's code besides your patch, but maybe this helps:
See virtual void onPortChange(const PortChangeEvent& e) {}
in Module.hpp.
Unfortunately, this event is not sent for stacked output cable events, only when the connected/disconnected state of the port changes. (Actually iterating over all the cables to determine the previous state, see Engine::addCable()
.) But it is sent for every input cable event (because there can only be one cable per port). And you still have to iterate over all cables because the event doesn't tell you the cable or the other module. So maybe you could limit the performance hit by only iterating over the cables when an input cable is being connected to the gate mode input.
Thanks for the hint - I won't be able to take a look for a while, but this will help when I do.
From here.
I suspect that this is due to the there being a 1 sample delay being introduced by the patch cable. A possible solution is to introduce a 1 sample delay to the gate out generator, but more investigation needed.