# HG changeset patch # User Chris Cannam # Date 1443439997 -3600 # Node ID f96ea0e4b4755f1fb8db092928729863640a39f3 # Parent a83a81ed13037ce087f618f559d88dc21579728b Fix compiler warnings with -Wall -Wextra diff -r a83a81ed1303 -r f96ea0e4b475 build/linux/Makefile.linux64 --- a/build/linux/Makefile.linux64 Tue Sep 08 17:32:03 2015 +0100 +++ b/build/linux/Makefile.linux64 Mon Sep 28 12:33:17 2015 +0100 @@ -1,6 +1,6 @@ -CFLAGS += -DNDEBUG -O3 -fno-exceptions -fPIC -ffast-math -msse -msse2 -mfpmath=sse -ftree-vectorize -DUSE_PTHREADS -#CFLAGS += -DDEBUG -g -fno-exceptions -fPIC -ffast-math -DUSE_PTHREADS +#CFLAGS += -DNDEBUG -O3 -fno-exceptions -fPIC -ffast-math -msse -msse2 -mfpmath=sse -ftree-vectorize -DUSE_PTHREADS +CFLAGS += -DDEBUG -g -fno-exceptions -Wall -Wextra -Werror -fPIC -ffast-math -DUSE_PTHREADS CXXFLAGS += $(CFLAGS) diff -r a83a81ed1303 -r f96ea0e4b475 plugins/AdaptiveSpectrogram.cpp --- a/plugins/AdaptiveSpectrogram.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/AdaptiveSpectrogram.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -39,17 +39,17 @@ m_n(2), m_coarse(false), m_threaded(true), - m_threadsInUse(false), m_decFactor(1), + m_buffer(0), m_buflen(0), - m_buffer(0), - m_decimator(0) + m_decimator(0), + m_threadsInUse(false) { } AdaptiveSpectrogram::~AdaptiveSpectrogram() { - for (int i = 0; i < m_cutThreads.size(); ++i) { + for (int i = 0; i < int(m_cutThreads.size()); ++i) { delete m_cutThreads[i]; } m_cutThreads.clear(); @@ -289,7 +289,7 @@ d.sampleRate = m_inputSampleRate / (m_decFactor * ((2 << m_w) / 2)); d.hasDuration = false; char name[20]; - for (int i = 0; i < d.binCount; ++i) { + for (int i = 0; i < int(d.binCount); ++i) { float freq = (m_inputSampleRate / (m_decFactor * (d.binCount * 2)) * (i + 1)); // no DC bin sprintf(name, "%.1f Hz", freq); d.binNames.push_back(name); @@ -307,7 +307,7 @@ } AdaptiveSpectrogram::FeatureSet -AdaptiveSpectrogram::process(const float *const *inputBuffers, RealTime ts) +AdaptiveSpectrogram::process(const float *const *inputBuffers, RealTime) { // framing: shift and write the new data to right half for (int i = 0; i < m_buflen/2; ++i) { @@ -392,7 +392,7 @@ cutting->erase(); - for (int i = 0; i < rmat.size(); ++i) { + for (int i = 0; i < int(rmat.size()); ++i) { Feature f; f.hasTimestamp = false; f.values = rmat[i]; diff -r a83a81ed1303 -r f96ea0e4b475 plugins/BarBeatTrack.cpp --- a/plugins/BarBeatTrack.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/BarBeatTrack.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -434,11 +434,11 @@ if (beat == m_bpb) beat = 0; } - for (size_t i = 0; i < beats.size(); ++i) { + for (int i = 0; i < int(beats.size()); ++i) { - size_t frame = beats[i] * m_d->dfConfig.stepSize; + size_t frame = size_t(beats[i]) * m_d->dfConfig.stepSize; - if (dbi < downbeats.size() && i == downbeats[dbi]) { + if (dbi < int(downbeats.size()) && i == downbeats[dbi]) { beat = 0; ++bar; ++dbi; @@ -452,19 +452,19 @@ // 1 -> bars // 2 -> beat counter function - Feature feature; - feature.hasTimestamp = true; - feature.timestamp = m_d->origin + Vamp::RealTime::frame2RealTime - (frame, lrintf(m_inputSampleRate)); + Feature feature; + feature.hasTimestamp = true; + feature.timestamp = m_d->origin + Vamp::RealTime::frame2RealTime + (frame, lrintf(m_inputSampleRate)); sprintf(label, "%d", beat + 1); feature.label = label; - returnFeatures[0].push_back(feature); // labelled beats + returnFeatures[0].push_back(feature); // labelled beats feature.values.push_back(beat + 1); returnFeatures[2].push_back(feature); // beat function - if (i > 0 && i <= beatsd.size()) { + if (i > 0 && i <= int(beatsd.size())) { feature.values.clear(); feature.values.push_back(beatsd[i-1]); feature.label = ""; diff -r a83a81ed1303 -r f96ea0e4b475 plugins/BeatTrack.cpp --- a/plugins/BeatTrack.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/BeatTrack.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -57,12 +57,12 @@ m_d(0), m_method(METHOD_NEW), m_dfType(DF_COMPLEXSD), - m_whiten(false), m_alpha(0.9), // MEPD new exposed parameter for beat tracker, default value = 0.9 (as old version) m_tightness(4.), m_inputtempo(120.), // MEPD new exposed parameter for beat tracker, default value = 120. (as old version) - m_constraintempo(false) // MEPD new exposed parameter for beat tracker, default value = false (as old version) + m_constraintempo(false), // MEPD new exposed parameter for beat tracker, default value = false (as old version) // calling the beat tracker with these default parameters will give the same output as the previous existing version + m_whiten(false) { } diff -r a83a81ed1303 -r f96ea0e4b475 plugins/ChromagramPlugin.cpp --- a/plugins/ChromagramPlugin.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/ChromagramPlugin.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -330,7 +330,7 @@ ChromagramPlugin::FeatureSet ChromagramPlugin::process(const float *const *inputBuffers, - Vamp::RealTime timestamp) + Vamp::RealTime ) { if (!m_chromagram) { cerr << "ERROR: ChromagramPlugin::process: " @@ -371,7 +371,7 @@ Feature feature; feature.hasTimestamp = false; - for (size_t i = 0; i < m_config.BPO; ++i) { + for (int i = 0; i < m_config.BPO; ++i) { double value = output[i]; /* if (printThis) { @@ -402,7 +402,7 @@ feature.hasTimestamp = true; feature.timestamp = Vamp::RealTime::zeroTime; - for (size_t i = 0; i < m_config.BPO; ++i) { + for (int i = 0; i < m_config.BPO; ++i) { double v = m_binsums[i]; if (m_count > 0) v /= m_count; feature.values.push_back(v); diff -r a83a81ed1303 -r f96ea0e4b475 plugins/DWT.cpp --- a/plugins/DWT.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/DWT.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -1,448 +1,448 @@ -/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ - -/* - QM Vamp Plugin Set - - Centre for Digital Music, Queen Mary, University of London. - This file copyright 2009 Thomas Wilmering. +/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */ + +/* + QM Vamp Plugin Set + + Centre for Digital Music, Queen Mary, University of London. + This file copyright 2009 Thomas Wilmering. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. See the file - COPYING included with this distribution for more information. -*/ - -#include "DWT.h" - -#include - -using std::string; -using std::vector; -using std::cerr; -using std::endl; - -DWT::DWT(float inputSampleRate) : - Plugin(inputSampleRate), - m_stepSize(0), - m_blockSize(0) -{ - m_scales = 10; - m_flength = 0; - m_wavelet = Wavelet::Haar; - m_threshold = 0; - m_absolute = 0; -} - -DWT::~DWT() -{ -} - -string -DWT::getIdentifier() const -{ - return "qm-dwt"; -} - -string -DWT::getName() const -{ - return "Discrete Wavelet Transform"; -} - -string -DWT::getDescription() const -{ - return "Visualisation by scalogram"; -} - -string -DWT::getMaker() const -{ - return "Queen Mary, University of London"; -} - -int -DWT::getPluginVersion() const -{ - return 1; -} - -string -DWT::getCopyright() const -{ - return "Plugin by Thomas Wilmering. Copyright (c) 2009 Thomas Wilmering and QMUL - All Rights Reserved"; -} - -size_t -DWT::getPreferredBlockSize() const -{ - size_t s = (1 << m_scales); - while (s < 1024) s *= 2; - return s; -} - -size_t -DWT::getPreferredStepSize() const -{ - return 0; -} - -bool -DWT::initialise(size_t channels, size_t stepSize, size_t blockSize) -{ - if (channels < getMinChannelCount() || - channels > getMaxChannelCount()) return false; - - if ((1 << m_scales) > blockSize) { - std::cerr << "DWT::initialise: ERROR: Block size must be at least 2^scales (specified block size " << blockSize << " < " << (1 << m_scales) << ")" << std::endl; - return false; - } - - m_stepSize = stepSize; - m_blockSize = blockSize; - - Wavelet::createDecompositionFilters(m_wavelet, m_lpd, m_hpd); - - m_flength = m_lpd.size(); // or m_hpd.size() - - m_samplePass.resize(m_scales); // resize buffer for samples to pass to next block - - for (int i=0; i b) b = 1 << s; // correct blocksize if smaller than 2^(max scale) - -//-------------------------------------------------------------------------------------------------- - - float tempDet; - float aTempDet; - int outloc; - int halfblocksize = int(.5 * b); - int fbufloc; - int fbufloc2; - - vector< vector > wCoefficients(m_scales); // result - vector tempAprx(halfblocksize,0.0); // approximation - vector fbuf(b+m_flength-2,0.0); // input buffer - - for (int n=m_flength-2; n blocksize - m_samplePass[scale].push_back(fbuf[m_flength-2+n]); - m_samplePass[scale].erase (m_samplePass[scale].begin(),m_samplePass[scale].begin()+b); - } - - for (int n=0; n> 1; // the approximation in tmpfwd is stored as - halfblocksize = halfblocksize >> 1; // input for next level - - for (int n=m_flength-2; n(b+m_flength-2).swap(fbuf); - vector(halfblocksize).swap(tempAprx); // set new size with zeros - } - } - - -//----------------------------------------------------------------------------------------- - - halfblocksize = int(.5 * b_init); - - for (int m = 0; m > wCoefficients(m_scales); // result - vector tempAprx(halfblocksize,0.0); // approximation - vector fbuf(b+len-2,0.0); // input buffer - - //for (int n=len-2; n blocksize - m_samplePass[scale].push_back(fbuf[len-2+n]); - m_samplePass[scale].erase (m_samplePass[scale].begin(),m_samplePass[scale].begin()+b); - } - - for (int n=0; n> 1; // the approximation in tmpfwd is stored as - halfblocksize = halfblocksize >> 1; // input for next level - - for (int n=len-2; n(b+len-2).swap(fbuf); - vector(halfblocksize).swap(tempAprx); // set new size with zeros - } - - } - -//----------------------------------------------------------------------------------------- - - halfblocksize = int(.5 * b_init + 0.1); - - for (int m = 0; m + +using std::string; +using std::vector; +using std::cerr; +using std::endl; + +DWT::DWT(float inputSampleRate) : + Plugin(inputSampleRate), + m_stepSize(0), + m_blockSize(0) +{ + m_scales = 10; + m_flength = 0; + m_wavelet = Wavelet::Haar; + m_threshold = 0; + m_absolute = 0; +} + +DWT::~DWT() +{ +} + +string +DWT::getIdentifier() const +{ + return "qm-dwt"; +} + +string +DWT::getName() const +{ + return "Discrete Wavelet Transform"; +} + +string +DWT::getDescription() const +{ + return "Visualisation by scalogram"; +} + +string +DWT::getMaker() const +{ + return "Queen Mary, University of London"; +} + +int +DWT::getPluginVersion() const +{ + return 1; +} + +string +DWT::getCopyright() const +{ + return "Plugin by Thomas Wilmering. Copyright (c) 2009 Thomas Wilmering and QMUL - All Rights Reserved"; +} + +size_t +DWT::getPreferredBlockSize() const +{ + size_t s = (1 << m_scales); + while (s < 1024) s *= 2; + return s; +} + +size_t +DWT::getPreferredStepSize() const +{ + return 0; +} + +bool +DWT::initialise(size_t channels, size_t stepSize, size_t blockSize) +{ + if (channels < getMinChannelCount() || + channels > getMaxChannelCount()) return false; + + if ((1U << m_scales) > blockSize) { + std::cerr << "DWT::initialise: ERROR: Block size must be at least 2^scales (specified block size " << blockSize << " < " << (1 << m_scales) << ")" << std::endl; + return false; + } + + m_stepSize = stepSize; + m_blockSize = blockSize; + + Wavelet::createDecompositionFilters(m_wavelet, m_lpd, m_hpd); + + m_flength = m_lpd.size(); // or m_hpd.size() + + m_samplePass.resize(m_scales); // resize buffer for samples to pass to next block + + for (int i=0; i b) b = 1 << s; // correct blocksize if smaller than 2^(max scale) + +//-------------------------------------------------------------------------------------------------- + + float tempDet; + float aTempDet; + int outloc; + int halfblocksize = int(.5 * b); + int fbufloc; + int fbufloc2; + + vector< vector > wCoefficients(m_scales); // result + vector tempAprx(halfblocksize,0.0); // approximation + vector fbuf(b+m_flength-2,0.0); // input buffer + + for (int n=m_flength-2; n blocksize + m_samplePass[scale].push_back(fbuf[m_flength-2+n]); + m_samplePass[scale].erase (m_samplePass[scale].begin(),m_samplePass[scale].begin()+b); + } + + for (int n=0; n> 1; // the approximation in tmpfwd is stored as + halfblocksize = halfblocksize >> 1; // input for next level + + for (int n=m_flength-2; n(b+m_flength-2).swap(fbuf); + vector(halfblocksize).swap(tempAprx); // set new size with zeros + } + } + + +//----------------------------------------------------------------------------------------- + + halfblocksize = int(.5 * b_init); + + for (int m = 0; m > wCoefficients(m_scales); // result + vector tempAprx(halfblocksize,0.0); // approximation + vector fbuf(b+len-2,0.0); // input buffer + + //for (int n=len-2; n blocksize + m_samplePass[scale].push_back(fbuf[len-2+n]); + m_samplePass[scale].erase (m_samplePass[scale].begin(),m_samplePass[scale].begin()+b); + } + + for (int n=0; n> 1; // the approximation in tmpfwd is stored as + halfblocksize = halfblocksize >> 1; // input for next level + + for (int n=len-2; n(b+len-2).swap(fbuf); + vector(halfblocksize).swap(tempAprx); // set new size with zeros + } + + } + +//----------------------------------------------------------------------------------------- + + halfblocksize = int(.5 * b_init + 0.1); + + for (int m = 0; m - -#include - -using std::vector; - -class DWT : public Vamp::Plugin -{ -public: - DWT(float inputSampleRate); - virtual ~DWT(); - - bool initialise(size_t channels, size_t stepSize, size_t blockSize); - void reset(); - - InputDomain getInputDomain() const { return TimeDomain; } - - std::string getIdentifier() const; - std::string getName() const; - std::string getDescription() const; - std::string getMaker() const; - int getPluginVersion() const; - std::string getCopyright() const; - size_t getPreferredBlockSize() const; - size_t getPreferredStepSize() const; - - OutputList getOutputDescriptors() const; - - ParameterList getParameterDescriptors() const; - float getParameter(std::string paramid) const; - void setParameter(std::string paramid, float newval); - - FeatureSet process(const float *const *inputBuffers, - Vamp::RealTime timestamp); - - FeatureSet getRemainingFeatures(); - -protected: - size_t m_stepSize; - size_t m_blockSize; - - int m_scales; - int m_flength; - Wavelet::Type m_wavelet; - float m_threshold; - float m_absolute; - - vector m_lpd; - vector m_hpd; - - vector< vector > m_samplePass; -}; - - -#endif + COPYING included with this distribution for more information. +*/ + +#ifndef _DWT_PLUGIN_H_ +#define _DWT_PLUGIN_H_ + +#include + +#include + +using std::vector; + +class DWT : public Vamp::Plugin +{ +public: + DWT(float inputSampleRate); + virtual ~DWT(); + + bool initialise(size_t channels, size_t stepSize, size_t blockSize); + void reset(); + + InputDomain getInputDomain() const { return TimeDomain; } + + std::string getIdentifier() const; + std::string getName() const; + std::string getDescription() const; + std::string getMaker() const; + int getPluginVersion() const; + std::string getCopyright() const; + size_t getPreferredBlockSize() const; + size_t getPreferredStepSize() const; + + OutputList getOutputDescriptors() const; + + ParameterList getParameterDescriptors() const; + float getParameter(std::string paramid) const; + void setParameter(std::string paramid, float newval); + + FeatureSet process(const float *const *inputBuffers, + Vamp::RealTime timestamp); + + FeatureSet getRemainingFeatures(); + +protected: + size_t m_stepSize; + size_t m_blockSize; + + int m_scales; + int m_flength; + Wavelet::Type m_wavelet; + float m_threshold; + float m_absolute; + + vector m_lpd; + vector m_hpd; + + vector< vector > m_samplePass; +}; + + +#endif diff -r a83a81ed1303 -r f96ea0e4b475 plugins/MFCCPlugin.cpp --- a/plugins/MFCCPlugin.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/MFCCPlugin.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -274,7 +274,7 @@ Feature feature; feature.hasTimestamp = false; - for (size_t i = 0; i < m_bins; ++i) { + for (int i = 0; i < m_bins; ++i) { double value = output[i]; if (ISNAN(value)) value = 0.0; m_binsums[i] += value; @@ -297,7 +297,7 @@ feature.hasTimestamp = true; feature.timestamp = Vamp::RealTime::zeroTime; - for (size_t i = 0; i < m_bins; ++i) { + for (int i = 0; i < m_bins; ++i) { double v = m_binsums[i]; if (m_count > 0) v /= m_count; feature.values.push_back(v); diff -r a83a81ed1303 -r f96ea0e4b475 plugins/SegmenterPlugin.cpp --- a/plugins/SegmenterPlugin.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/SegmenterPlugin.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -28,8 +28,10 @@ SegmenterPlugin::SegmenterPlugin(float inputSampleRate) : Plugin(inputSampleRate), segmenter(0), + hopsize(0), + windowsize(0), + neighbourhoodLimit(4), nSegmentTypes(10), - neighbourhoodLimit(4), featureType(feature_types(1)) { @@ -81,14 +83,14 @@ if (!segmenter) makeSegmenter(); - if (stepSize != hopsize) { + if (int(stepSize) != hopsize) { std::cerr << "SegmenterPlugin::initialise: supplied step size " << stepSize << " differs from required step size " << hopsize << std::endl; return false; } - if (blockSize != windowsize) { + if (int(blockSize) != windowsize) { std::cerr << "SegmenterPlugin::initialise: supplied block size " << blockSize << " differs from required block size " << windowsize << std::endl; @@ -282,7 +284,7 @@ { // convert float* to double* double *tempBuffer = new double[windowsize]; - for (size_t i = 0; i < windowsize; ++i) { + for (int i = 0; i < windowsize; ++i) { tempBuffer[i] = inputBuffers[0][i]; } @@ -308,7 +310,7 @@ std::map typeMap; int nextType = 1; - for (int i = 0; i < segm.segments.size(); ++i) { + for (int i = 0; i < int(segm.segments.size()); ++i) { Segment s = segm.segments[i]; if (typeMap.find(s.type) == typeMap.end()) { typeMap[s.type] = nextType; @@ -316,7 +318,7 @@ } } - for (int i = 0; i < segm.segments.size(); ++i) { + for (int i = 0; i < int(segm.segments.size()); ++i) { Segment s = segm.segments[i]; @@ -326,7 +328,7 @@ (s.start, (int)m_inputSampleRate); feature.hasDuration = true; - if (i + 1 < segm.segments.size()) { + if (i + 1 < int(segm.segments.size())) { feature.duration = Vamp::RealTime::frame2RealTime (segm.segments[i+1].start - s.start, (int)m_inputSampleRate); } else { diff -r a83a81ed1303 -r f96ea0e4b475 plugins/SimilarityPlugin.cpp --- a/plugins/SimilarityPlugin.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/SimilarityPlugin.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -507,19 +507,19 @@ void SimilarityPlugin::reset() { - for (int i = 0; i < m_values.size(); ++i) { + for (int i = 0; i < int(m_values.size()); ++i) { m_values[i].clear(); } - for (int i = 0; i < m_rhythmValues.size(); ++i) { + for (int i = 0; i < int(m_rhythmValues.size()); ++i) { m_rhythmValues[i].clear(); } - for (int i = 0; i < m_lastNonEmptyFrame.size(); ++i) { + for (int i = 0; i < int(m_lastNonEmptyFrame.size()); ++i) { m_lastNonEmptyFrame[i] = -1; } - for (int i = 0; i < m_emptyFrameCount.size(); ++i) { + for (int i = 0; i < int(m_emptyFrameCount.size()); ++i) { m_emptyFrameCount[i] = 0; } @@ -544,7 +544,7 @@ bool someRhythmFrameNeeded = false; - for (size_t c = 0; c < m_channels; ++c) { + for (int c = 0; c < m_channels; ++c) { bool empty = true; @@ -557,7 +557,7 @@ if (empty) { if (needRhythm() && ((m_frameNo % 2) == 0)) { for (int i = 0; i < m_fftSize / m_rhythmClipFrameSize; ++i) { - if (m_rhythmValues[c].size() < m_rhythmClipFrames) { + if (int(m_rhythmValues[c].size()) < m_rhythmClipFrames) { FeatureColumn mf(m_rhythmColumnSize); for (int i = 0; i < m_rhythmColumnSize; ++i) { mf[i] = 0.0; @@ -609,7 +609,7 @@ bool needRhythmFrame = true; - if (m_rhythmValues[c].size() >= m_rhythmClipFrames) { + if (int(m_rhythmValues[c].size()) >= m_rhythmClipFrames) { needRhythmFrame = false; @@ -681,7 +681,9 @@ int sz = m_lastNonEmptyFrame[i] - m_emptyFrameCount[i]; if (sz < 0) sz = 0; - if (sz >= m_values[i].size()) sz = m_values[i].size()-1; + if (sz >= int(m_values[i].size())) { + sz = int(m_values[i].size())-1; + } count = 0; for (int k = 0; k < sz; ++k) { @@ -803,7 +805,7 @@ FeatureMatrixSet bsinput(m_channels); for (int i = 0; i < m_channels; ++i) { - for (int j = 0; j < m_rhythmValues[i].size(); ++j) { + for (int j = 0; j < int(m_rhythmValues[i].size()); ++j) { bsinput[i].push_back(m_rhythmValues[i][j]); } } @@ -834,7 +836,7 @@ feature.label = labelBuffer; feature.values.clear(); - for (int j = 0; j < bs[i].size(); ++j) { + for (int j = 0; j < int(bs[i].size()); ++j) { feature.values.push_back(bs[i][j]); } diff -r a83a81ed1303 -r f96ea0e4b475 plugins/SimilarityPlugin.h --- a/plugins/SimilarityPlugin.h Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/SimilarityPlugin.h Mon Sep 28 12:33:17 2015 +0100 @@ -82,8 +82,8 @@ int m_rhythmClipFrameSize; int m_rhythmClipFrames; int m_rhythmColumnSize; - mutable size_t m_blockSize; // before decimation - size_t m_fftSize; // after decimation + mutable int m_blockSize; // before decimation + int m_fftSize; // after decimation int m_channels; int m_processRate; int m_frameNo; diff -r a83a81ed1303 -r f96ea0e4b475 plugins/TonalChangeDetect.cpp --- a/plugins/TonalChangeDetect.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/TonalChangeDetect.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -407,13 +407,11 @@ ChangeDetectionFunction df(dfc); ChangeDistance d = df.process(m_TCSGram); - - - for (int i = 0; i < d.size(); i++) + for (int i = 0; i < int(d.size()); i++) { double dCurrent = d[i]; double dPrevious = d[i > 0 ? i - 1 : i]; - double dNext = d[i < d.size()-1 ? i + 1 : i]; + double dNext = d[i < int(d.size())-1 ? i + 1 : i]; Feature feature; feature.label = ""; diff -r a83a81ed1303 -r f96ea0e4b475 plugins/Transcription.cpp --- a/plugins/Transcription.cpp Tue Sep 08 17:32:03 2015 +0100 +++ b/plugins/Transcription.cpp Mon Sep 28 12:33:17 2015 +0100 @@ -351,10 +351,10 @@ if (m_Excess) return FeatureSet(); - for (size_t i = 0; i < m_blockSize;i++) { + for (int i = 0; i < m_blockSize;i++) { if (m_SampleN >= m_AllocN) { - size_t newsize = m_AllocN * 2; + int newsize = m_AllocN * 2; if (newsize < 10000) newsize = 10000; double *newbuf = (double *)realloc(m_SoundIn, newsize * sizeof(double)); if (!newbuf) { @@ -382,10 +382,9 @@ double *hello1; double *hello2; int Msec; - size_t i; - size_t j; - size_t n; - size_t count; + int i; + int j; + int n; Msec=(int)(100*m_SampleN/m_inputSampleRate); @@ -471,9 +470,7 @@ double starts[88]; for (n = 0; n < 88; ++n) starts[n] = -1.0; - int nn; for (j = 0; j