# HG changeset patch # User Giulio Moro # Date 1466454028 -3600 # Node ID 838a4a4a858085a6788a05f38046a8d73305a766 # Parent faa5f58c71afe2ea5b023d5dbc831b9cdee7c93e Removed warnings, now libpd_render can compile with Clang as well diff -r faa5f58c71af -r 838a4a4a8580 core/I2c_Codec.cpp --- a/core/I2c_Codec.cpp Mon Jun 20 20:39:00 2016 +0100 +++ b/core/I2c_Codec.cpp Mon Jun 20 21:20:28 2016 +0100 @@ -166,7 +166,7 @@ //set fractional part(between 0 and 9999) of the numerator mutliplier of the PLL int I2c_Codec::setPllD(unsigned int d){ - if(d<0 || d>9999) + if(d >9999) return 1; if(writeRegister(0x05, (d>>6)&255)){ // PLL register C: part 1 : 8 most significant bytes of a 14bit integer printf("I2C error while writing PLL d part 1 : %d", d); diff -r faa5f58c71af -r 838a4a4a8580 core/default_libpd_render.cpp --- a/core/default_libpd_render.cpp Mon Jun 20 20:39:00 2016 +0100 +++ b/core/default_libpd_render.cpp Mon Jun 20 21:20:28 2016 +0100 @@ -126,16 +126,19 @@ static unsigned int gLibpdBlockSize; // 2 audio + (up to)8 analog + (up to) 16 digital + 4 scope outputs static const unsigned int gChannelsInUse = 30; -static const unsigned int gFirstAudioChannel = 0; +//static const unsigned int gFirstAudioChannel = 0; static const unsigned int gFirstAnalogChannel = 2; static const unsigned int gFirstDigitalChannel = 10; static const unsigned int gFirstScopeChannel = 26; Scope scope; unsigned int gScopeChannels = 4; +float* gScopeOut; + bool setup(BelaContext *context, void *userData) { scope.setup(gScopeChannels, context->audioSampleRate); + gScopeOut = new float[gScopeChannels]; // Check first of all if file exists. Will actually open it later. char file[] = "_main.pd"; @@ -385,11 +388,10 @@ } //scope for (j = 0, p0 = gOutBuf; j < gLibpdBlockSize; ++j, ++p0) { - float scopeOut[gScopeChannels]={0}; for (k = 0, p1 = p0 + gLibpdBlockSize * gFirstScopeChannel; k < gScopeChannels; k++, p1 += gLibpdBlockSize) { - scopeOut[k] = *p1; + gScopeOut[k] = *p1; } - scope.log(scopeOut[0], scopeOut[1], scopeOut[2], scopeOut[3]); + scope.log(gScopeOut[0], gScopeOut[1], gScopeOut[2], gScopeOut[3]); } @@ -425,4 +427,5 @@ void cleanup(BelaContext *context, void *userData) { + delete [] gScopeOut; } diff -r faa5f58c71af -r 838a4a4a8580 include/DigitalChannelManager.h --- a/include/DigitalChannelManager.h Mon Jun 20 20:39:00 2016 +0100 +++ b/include/DigitalChannelManager.h Mon Jun 20 21:20:28 2016 +0100 @@ -232,7 +232,6 @@ virtual ~DigitalChannelManager(); private: bool callbackEnabled; - void* callbackArg; void* callbackArguments[16]; void (*stateChangedCallback)(bool value, unsigned int delay, void* arg); uint32_t clearDataOut;