changeset 483:dbc76783db2a prerelease

libpd minor refactoring
author Giulio Moro <giuliomoro@yahoo.it>
date Tue, 21 Jun 2016 14:28:17 +0100
parents 4d5edf7ee953
children afbc8f973bb3
files core/default_libpd_render.cpp
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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]);