diff --git a/src/dsp/CompoundAudioCurve.cpp b/src/dsp/CompoundAudioCurve.cpp index 4ce4e06..ca22551 100644 --- a/src/dsp/CompoundAudioCurve.cpp +++ b/src/dsp/CompoundAudioCurve.cpp @@ -111,11 +111,7 @@ double CompoundAudioCurve::processFiltering(double percussive, double hf) { if (m_type == PercussiveDetector) { - if (percussive > 0.35) { - return 1.0; - } else { - return 0.0; - } + return percussive; } double rv = 0.f; @@ -138,15 +134,16 @@ CompoundAudioCurve::processFiltering(double percussive, double hf) result = hfDeriv - hfDerivFiltered; } - if (m_type != SoftDetector && percussive > 0.35 && hfExcess > 0.0) { - rv = 1.0; + if (result < m_lastResult) { + if (m_risingCount > 3 && m_lastResult > 0) rv = 0.5; m_risingCount = 0; } else { - if (result < m_lastResult) { - if (m_risingCount > 3 && m_lastResult > 0) rv = 0.5; - m_risingCount = 0; - } else { - m_risingCount ++; + m_risingCount ++; + } + + if (m_type == CompoundDetector) { + if (percussive > 0.35 && percussive > rv) { + rv = percussive; } } diff --git a/src/dsp/FFT.cpp b/src/dsp/FFT.cpp index 4a187e1..0b3e7e0 100644 --- a/src/dsp/FFT.cpp +++ b/src/dsp/FFT.cpp @@ -26,6 +26,8 @@ #endif + + #ifdef USE_KISSFFT #include "kissfft/kiss_fftr.h" #endif @@ -80,6 +82,8 @@ namespace FFTs { + + #ifdef HAVE_FFTW3 // Define FFTW_DOUBLE_ONLY to make all uses of FFTW functions be @@ -1280,6 +1284,26 @@ FFT::FFT(int size, int debugLevel) #endif break; + case 5: + std::cerr << "FFT::FFT(" << size << "): WARNING: Selected implemention not available" << std::endl; +#ifdef USE_BUILTIN_FFT + d = new FFTs::D_Cross(size); +#else + std::cerr << "FFT::FFT(" << size << "): ERROR: Fallback implementation not available!" << std::endl; + abort(); +#endif + break; + + case 6: + std::cerr << "FFT::FFT(" << size << "): WARNING: Selected implemention not available" << std::endl; +#ifdef USE_BUILTIN_FFT + d = new FFTs::D_Cross(size); +#else + std::cerr << "FFT::FFT(" << size << "): ERROR: Fallback implementation not available!" << std::endl; + abort(); +#endif + break; + default: #ifdef USE_BUILTIN_FFT std::cerr << "FFT::FFT(" << size << "): WARNING: using slow built-in implementation" << std::endl;