Mercurial > hg > svcore
comparison data/fft/FFTapi.h @ 1136:e94719f941ba tony-2.0-integration
Return maximum through getNormalizedMagnitudesAt to avoid having to make more than one call
author | Chris Cannam |
---|---|
date | Tue, 20 Oct 2015 12:54:06 +0100 |
parents | db946591a391 |
children |
comparison
equal
deleted
inserted
replaced
1135:7fb1a7199e5b | 1136:e94719f941ba |
---|---|
73 fftf_destroy_plan(m_plan); | 73 fftf_destroy_plan(m_plan); |
74 fftf_free(m_input); | 74 fftf_free(m_input); |
75 fftf_free(m_output); | 75 fftf_free(m_output); |
76 } | 76 } |
77 | 77 |
78 std::vector<std::complex<float> > process(std::vector<float> in) const { | 78 std::vector<std::complex<float> > process(const std::vector<float> &in) const { |
79 const int hs = m_size/2; | 79 const int hs = m_size/2; |
80 for (int i = 0; i < hs; ++i) { | 80 for (int i = 0; i < hs; ++i) { |
81 m_input[i] = in[i + hs]; | 81 m_input[i] = in[i + hs]; |
82 } | 82 } |
83 for (int i = 0; i < hs; ++i) { | 83 for (int i = 0; i < hs; ++i) { |