comparison examples/PercussionOnsetDetector.cpp @ 82:c8b48bc6db3d

* Add sdkstatic target
author cannam
date Wed, 19 Sep 2007 14:04:12 +0000
parents aa64a46320d4
children a5187dad96cd
comparison
equal deleted inserted replaced
81:e4826d5365b8 82:c8b48bc6db3d
237 237
238 for (size_t i = 1; i < m_blockSize/2; ++i) { 238 for (size_t i = 1; i < m_blockSize/2; ++i) {
239 239
240 float real = inputBuffers[0][i*2]; 240 float real = inputBuffers[0][i*2];
241 float imag = inputBuffers[0][i*2 + 1]; 241 float imag = inputBuffers[0][i*2 + 1];
242
242 float sqrmag = real * real + imag * imag; 243 float sqrmag = real * real + imag * imag;
243 244
244 if (m_priorMagnitudes[i] > 0.f) { 245 if (m_priorMagnitudes[i] > 0.f) {
245 float diff = 10.f * log10f(sqrmag / m_priorMagnitudes[i]); 246 float diff = 10.f * log10f(sqrmag / m_priorMagnitudes[i]);
246 247