diff --git a/src/AudioLibs/AudioEspressifFFT.h b/src/AudioLibs/AudioEspressifFFT.h index 187ce70be..f80f00b0a 100644 --- a/src/AudioLibs/AudioEspressifFFT.h +++ b/src/AudioLibs/AudioEspressifFFT.h @@ -67,6 +67,34 @@ class FFTDriverEspressifFFT : public FFTDriver { } }; + void rfft() override { + conjugate(); + ret = dsps_fft2r_fc32(p_data, len); + if (ret != ESP_OK){ + LOGE("dsps_fft2r_fc32 %d", ret); + } + conjugate(); + // Bit reverse + ret = dsps_bit_rev_fc32(p_data, len); + if (ret != ESP_OK){ + LOGE("dsps_bit_rev_fc32 %d", ret); + } + // Convert one complex vector to two complex vectors + ret = dsps_cplx2reC_fc32(p_data, len); + if (ret != ESP_OK){ + LOGE("dsps_cplx2reC_fc32 %d", ret); + } + } + + void conjugate(){ + FFTBin bin; + for (int j=0;jsetBin(idx, real, img);} + /// sets the value of a bin + bool setBin(int pos, FFTBin &bin) { return p_driver->setBin(pos, bin.real, bin.img);} + /// gets the value of a bin + bool getBin(int pos, FFTBin &bin) { return p_driver->getBin(pos, bin);} + + /// Provides the actual configuration AudioFFTConfig &config() { return cfg; diff --git a/src/AudioLibs/AudioRealFFT.h b/src/AudioLibs/AudioRealFFT.h index c54a963fe..823cd806d 100644 --- a/src/AudioLibs/AudioRealFFT.h +++ b/src/AudioLibs/AudioRealFFT.h @@ -63,7 +63,7 @@ class FFTDriverRealFFT : public FFTDriver { return (p_x[idx] * p_x[idx] + p_f[idx] * p_f[idx]); } - virtual bool isValid() override{ return p_fft_object!=nullptr; } + bool isValid() override{ return p_fft_object!=nullptr; } /// get Real value float getValue(int idx) override { return p_x[idx];} diff --git a/src/AudioLibs/SDDirect.h b/src/AudioLibs/SDDirect.h index 2f7465259..7a664990a 100644 --- a/src/AudioLibs/SDDirect.h +++ b/src/AudioLibs/SDDirect.h @@ -12,7 +12,7 @@ namespace audio_tools { /** * @brief We access the files directy with an index. The index is determined by * a recurseve tree walk thru the directory. Unfortunatly the SDTFAT library has - * it's own API which is incompatible with the SDT API + * it's own API which is incompatible with the SD API */ template class SDDirect {