Skip to content

Commit

Permalink
more confort functions
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexandreRouma committed May 16, 2022
1 parent b32df38 commit 7312aa4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/dsp/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,16 @@ namespace dsp {
}
}

template<typename Func>
void setBlockEnabled(Processor<T, T>* block, bool enabled, Func onOutputChange) {
if (enabled) {
enableBlock(block, onOutputChange);
}
else {
disableBlock(block, onOutputChange);
}
}

void start() {
if (running) { return; }
for (auto& ln : links) {
Expand Down

0 comments on commit 7312aa4

Please sign in to comment.