diff options
| author | Tim Redfern <tim@eclectronics.org> | 2013-09-10 15:47:25 +0100 |
|---|---|---|
| committer | Tim Redfern <tim@eclectronics.org> | 2013-09-10 15:47:25 +0100 |
| commit | 449a223a426099be9b697177c998fa62afbb7c59 (patch) | |
| tree | 4b88643c4d39b4523181bca1d919bd71f3efd02a /rotord | |
| parent | 438b85dba5c7b59c736a8c2b69667370afcc20da (diff) | |
best effort at memory fixes
Diffstat (limited to 'rotord')
| -rw-r--r-- | rotord/Makefile | 7 | ||||
| -rw-r--r-- | rotord/src/nodes_audio_analysis.cpp | 5 | ||||
| -rw-r--r-- | rotord/src/nodes_audio_analysis.h | 9 |
3 files changed, 17 insertions, 4 deletions
diff --git a/rotord/Makefile b/rotord/Makefile index 29378ad..3e5902b 100644 --- a/rotord/Makefile +++ b/rotord/Makefile @@ -113,10 +113,15 @@ Release: CXXFLAGS += -O2 Release: $(PROGRAM) -Debug: CXXFLAGS += -g3 +Debug: CXXFLAGS += -g3 Debug: $(PROGRAM) +Valgrind: CXXFLAGS += -O0 +Valgrind: CXXFLAGS += -g3 + +Valgrind: $(PROGRAM) + prefix=/usr/local Install: rotord diff --git a/rotord/src/nodes_audio_analysis.cpp b/rotord/src/nodes_audio_analysis.cpp index 85894d9..154bf79 100644 --- a/rotord/src/nodes_audio_analysis.cpp +++ b/rotord/src/nodes_audio_analysis.cpp @@ -7,10 +7,11 @@ namespace Rotor{ bits=_bits; samples=_samples; samples_per_column=samples/width; - column=0; //point thumbnail bitmap - out_sample=0; //sample in whole track offset=0x1<<(bits-1); //signed audio scale=1.0f/offset; + + column=0; //point thumbnail bitmap + out_sample=0; //sample in whole track sample=0; samples=0; accum=0.0; diff --git a/rotord/src/nodes_audio_analysis.h b/rotord/src/nodes_audio_analysis.h index ca7c204..bf55beb 100644 --- a/rotord/src/nodes_audio_analysis.h +++ b/rotord/src/nodes_audio_analysis.h @@ -15,6 +15,13 @@ namespace Rotor { height=128; width=512; //fit vectordata =new float[width]; + + //trying to reduce valgrind errors + column=0; //point thumbnail bitmap + out_sample=0; //sample in whole track + sample=0; + samples=0; + accum=0.0; }; ~Audio_thumbnailer(){ delete[] vectordata; @@ -28,7 +35,7 @@ namespace Rotor { int height,width,samples_per_column; int column,out_sample,sample,samples; int offset; - double scale,accum; + float scale,accum; }; class Vamp_node: public Audio_processor { //base class for vamp plugin hosts |
