Mercurial > hg > vamp-simple-cepstrum
changeset 1:ce41d2d066a1
Minor simplification
author | Chris Cannam |
---|---|
date | Fri, 22 Jun 2012 16:58:55 +0100 |
parents | 02587f02ef41 |
children | e6faf01e25d8 |
files | SimpleCepstrum.cpp |
diffstat | 1 files changed, 5 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/SimpleCepstrum.cpp Fri Jun 22 13:38:51 2012 +0100 +++ b/SimpleCepstrum.cpp Fri Jun 22 16:58:55 2012 +0100 @@ -274,6 +274,8 @@ SimpleCepstrum::FeatureSet SimpleCepstrum::process(const float *const *inputBuffers, Vamp::RealTime timestamp) { + FeatureSet fs; + int bs = m_blockSize; int hs = m_blockSize/2 + 1; @@ -288,12 +290,9 @@ } double *cep = new double[bs]; - double *discard0 = new double[bs]; - double *discard1 = new double[bs]; - for (int i = 0; i < bs; ++i) discard0[i] = 0.0; - fft(bs, true, logmag, discard0, cep, discard1); - delete[] discard0; - delete[] discard1; + double *discard = new double[bs]; + fft(bs, true, logmag, 0, cep, discard); + delete[] discard; if (m_clamp) { for (int i = 0; i < bs; ++i) { @@ -301,8 +300,6 @@ } } - FeatureSet fs; - int from = int(m_inputSampleRate / m_fmax); int to = int(m_inputSampleRate / m_fmin);