Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
PdContext usually only has one graph. Make a special case for process…
…ing it.
  • Loading branch information
mhroth committed Feb 24, 2012
1 parent c64672a commit 38fc689
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions src/PdContext.cpp
Expand Up @@ -168,11 +168,17 @@ void PdContext::process(float *inputBuffers, float *outputBuffers) {
object->sendMessage(outletIndex, message);
message->freeMessage(); // free the message now that it has been sent and processed
}

int numGraphs = graphList.size();
PdGraph **graph = (numGraphs > 0) ? &graphList.front() : NULL;
for (int i = 0; i < numGraphs; ++i) {
graph[i]->processDsp();

switch (graphList.size()) {
case 0: break;
case 1: graphList.front()->processDsp(); break;
default: {
int numGraphs = graphList.size();
PdGraph **graph = &graphList.front();
for (int i = 0; i < numGraphs; ++i) {
graph[i]->processDsp();
}
}
}

blockStartTimestamp = nextBlockStartTimestamp;
Expand Down

0 comments on commit 38fc689

Please sign in to comment.