# HG changeset patch # User Chris Cannam # Date 1454584419 0 # Node ID 444d133b5ab75cdd6624a5d2593411c436201333 # Parent 2dc27f0f97ad7323557dcb1c717f97feb19e190b# Parent e94719f941ba86d53732cd872904ab6193b2c5b2 Merge from branch "tony-2.0-integration" diff -r 2dc27f0f97ad -r 444d133b5ab7 data/fft/FFTapi.h --- a/data/fft/FFTapi.h Fri Jan 22 18:12:06 2016 +0000 +++ b/data/fft/FFTapi.h Thu Feb 04 11:13:39 2016 +0000 @@ -75,7 +75,7 @@ fftf_free(m_output); } - std::vector > process(std::vector in) const { + std::vector > process(const std::vector &in) const { const int hs = m_size/2; for (int i = 0; i < hs; ++i) { m_input[i] = in[i + hs]; diff -r 2dc27f0f97ad -r 444d133b5ab7 data/model/FFTModel.cpp --- a/data/model/FFTModel.cpp Fri Jan 22 18:12:06 2016 +0000 +++ b/data/model/FFTModel.cpp Thu Feb 04 11:13:39 2016 +0000 @@ -149,7 +149,7 @@ return true; } -bool +float FFTModel::getNormalizedMagnitudesAt(int x, float *values, int minbin, int count) const { if (!getMagnitudesAt(x, values, minbin, count)) return false; @@ -163,7 +163,7 @@ values[i] /= max; } } - return true; + return max; } bool diff -r 2dc27f0f97ad -r 444d133b5ab7 data/model/FFTModel.h --- a/data/model/FFTModel.h Fri Jan 22 18:12:06 2016 +0000 +++ b/data/model/FFTModel.h Thu Feb 04 11:13:39 2016 +0000 @@ -101,7 +101,7 @@ float getPhaseAt(int x, int y) const; void getValuesAt(int x, int y, float &real, float &imaginary) const; bool getMagnitudesAt(int x, float *values, int minbin = 0, int count = 0) const; - bool getNormalizedMagnitudesAt(int x, float *values, int minbin = 0, int count = 0) const; + float getNormalizedMagnitudesAt(int x, float *values, int minbin = 0, int count = 0) const; // returns maximum of unnormalized magnitudes bool getPhasesAt(int x, float *values, int minbin = 0, int count = 0) const; bool getValuesAt(int x, float *reals, float *imaginaries, int minbin = 0, int count = 0) const;