Skip to content

Commit

Permalink
Fix loop termination condition
Browse files Browse the repository at this point in the history
  • Loading branch information
gustafullberg committed Apr 17, 2024
1 parent 2fb94bd commit 1613ea7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/source/connectiongraph/connectiongraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ void ConnectionGraph::compileModule(int module,
from_module, from_pad, module, to_pad));
}
} else {
if (recursive_dependency && !is_recursive) {
if (recursive_dependency && !is_recursive && loop_start) {
// Terminate loop if moving from sample to block processing.
program.push_back(Instruction(OP_LOOP, *loop_start));
loop_start.reset();
Expand Down Expand Up @@ -263,7 +263,7 @@ void ConnectionGraph::compileModule(int module,
}

void ConnectionGraph::processBlock(int module, float sampleRate) {
if (!compilationStatus.has_value() || module != *compilationStatus)
if (!compilationStatus || module != *compilationStatus)
compileProgram(module);
if (sampleRate != fs)
setSamplerate(sampleRate);
Expand Down

0 comments on commit 1613ea7

Please sign in to comment.