# HG changeset patch # User Giulio Moro # Date 1466515697 -3600 # Node ID dbc76783db2a9d553d0005265ff23dccc3373c8b # Parent 4d5edf7ee9530e7048e7d01dbc0431d6dbf3b15a libpd minor refactoring diff -r 4d5edf7ee953 -r dbc76783db2a core/default_libpd_render.cpp --- a/core/default_libpd_render.cpp Tue Jun 21 14:27:26 2016 +0100 +++ b/core/default_libpd_render.cpp Tue Jun 21 14:28:17 2016 +0100 @@ -132,13 +132,13 @@ static const unsigned int gFirstScopeChannel = 26; Scope scope; -unsigned int gScopeChannels = 4; +unsigned int gScopeChannelsInUse = 4; float* gScopeOut; bool setup(BelaContext *context, void *userData) { - scope.setup(gScopeChannels, context->audioSampleRate); - gScopeOut = new float[gScopeChannels]; + scope.setup(gScopeChannelsInUse, context->audioSampleRate); + gScopeOut = new float[gScopeChannelsInUse]; // Check first of all if file exists. Will actually open it later. char file[] = "_main.pd"; @@ -393,7 +393,7 @@ } //scope for (j = 0, p0 = gOutBuf; j < gLibpdBlockSize; ++j, ++p0) { - for (k = 0, p1 = p0 + gLibpdBlockSize * gFirstScopeChannel; k < gScopeChannels; k++, p1 += gLibpdBlockSize) { + for (k = 0, p1 = p0 + gLibpdBlockSize * gFirstScopeChannel; k < gScopeChannelsInUse; k++, p1 += gLibpdBlockSize) { gScopeOut[k] = *p1; } scope.log(gScopeOut[0], gScopeOut[1], gScopeOut[2], gScopeOut[3]);