Merge from branch speexdsp

This commit is contained in:
Chris Cannam
2022-09-02 11:12:35 +01:00
5 changed files with 53 additions and 25 deletions

View File

@@ -55,6 +55,10 @@
#ifdef USE_SPEEX
#include "../ext/speex/speex_resampler.h"
#else
#ifdef HAVE_LIBSPEEXDSP
#include <speex/speex_resampler.h>
#endif
#endif
#ifdef USE_BQRESAMPLER
@@ -64,6 +68,7 @@
#ifndef HAVE_IPP
#ifndef HAVE_LIBSAMPLERATE
#ifndef HAVE_LIBRESAMPLE
#ifndef HAVE_LIBSPEEXDSP
#ifndef USE_SPEEX
#ifndef USE_BQRESAMPLER
#error No resampler implementation selected!
@@ -72,6 +77,7 @@
#endif
#endif
#endif
#endif
#define BQ_R__ R__
@@ -1106,7 +1112,7 @@ D_BQResampler::reset()
#endif /* USE_BQRESAMPLER */
#ifdef USE_SPEEX
#if defined(USE_SPEEX) || defined(HAVE_LIBSPEEXDSP)
class D_Speex : public Resampler::Impl
{
@@ -1404,6 +1410,9 @@ Resampler::Resampler(Resampler::Parameters params, int channels)
#ifdef USE_SPEEX
m_method = 2;
#endif
#ifdef HAVE_LIBSPEEXDSP
m_method = 2;
#endif
#ifdef HAVE_LIBRESAMPLE
m_method = 3;
#endif
@@ -1425,6 +1434,9 @@ Resampler::Resampler(Resampler::Parameters params, int channels)
#ifdef USE_SPEEX
m_method = 2;
#endif
#ifdef HAVE_LIBSPEEXDSP
m_method = 2;
#endif
#ifdef USE_BQRESAMPLER
m_method = 4;
#endif
@@ -1443,6 +1455,9 @@ Resampler::Resampler(Resampler::Parameters params, int channels)
#ifdef USE_SPEEX
m_method = 2;
#endif
#ifdef HAVE_LIBSPEEXDSP
m_method = 2;
#endif
#ifdef USE_BQRESAMPLER
m_method = 4;
#endif
@@ -1483,7 +1498,7 @@ Resampler::Resampler(Resampler::Parameters params, int channels)
break;
case 2:
#ifdef USE_SPEEX
#if defined(USE_SPEEX) || defined(HAVE_LIBSPEEXDSP)
d = new Resamplers::D_Speex
(params.quality, params.ratioChange,
channels,

View File

@@ -641,7 +641,7 @@ R2Stretcher::configure()
if (!m_realtime && fftSizeChanged) {
delete m_studyFFT;
m_studyFFT = new FFT(m_fftSize, m_log.getDebugLevel());
m_studyFFT = new FFT(m_fftSize);
m_studyFFT->initFloat();
}