slight opt for transpose (skip processing if offset=0)

master
zetaPRIME 2022-03-07 20:07:16 -05:00
parent 149ab65c08
commit d8d7fac590
1 changed files with 5 additions and 0 deletions

View File

@ -48,6 +48,11 @@ void Transpose::process() {
auto in = std::static_pointer_cast<CommandPort>(port(Port::Input, Port::Command, 0));
auto out = std::static_pointer_cast<CommandPort>(port(Port::Output, Port::Command, 0));
if (off == 0) { // a
if (out->passthroughTo.expired()) out->passthroughTo = in;
return;
}
if (!out->passthroughTo.expired()) out->passthroughTo.reset();
in->pull();
out->pull();