# HG changeset patch # User Giulio Moro # Date 1466518658 -3600 # Node ID 506a319c08cfe6ccb2192da72062d2078d3b29c0 # Parent afbc8f973bb37db4b05787ab79e6122f54a0d80f Scope can now take a float* to an array instead of individual variables diff -r afbc8f973bb3 -r 506a319c08cf core/Scope.cpp --- a/core/Scope.cpp Tue Jun 21 15:16:55 2016 +0100 +++ b/core/Scope.cpp Tue Jun 21 15:17:38 2016 +0100 @@ -80,6 +80,47 @@ started = false; } +void Scope::log(float* values){ + //TODO: contains lots of duplicated code from log(float,...). + //TODO: needs refactoring + // check for any received OSC messages + while (oscServer.messageWaiting()){ + parseMessage(oscServer.popMessage()); + } + + if (!started) return; + + if (downSampling > 1){ + if (downSampleCount < downSampling){ + downSampleCount++; + return; + } + downSampleCount = 1; + } + + int startingWritePointer = writePointer; + + // save the logged samples into the buffer + for (int i=0; i 1, save repeated samples into the buffer + for (int j=1; j