Change channel_spectrum type to std::complex<float>.

Move FFT bit-reversal to complex<int16_t> -> complex<float> copy.
Change window so that adjacent bins have constant(-ish) gain.
Change window to float.
Change time domain samples to accumulate at even intervals over the FFT interval.
This commit is contained in:
Jared Boone 2015-09-17 17:37:05 -07:00
parent 882fbbef31
commit 291de8f869
4 changed files with 294 additions and 162 deletions

View file

@ -31,6 +31,7 @@
#include <array>
#include <cstdint>
#include <complex>
class BasebandProcessor {
public:
@ -52,7 +53,7 @@ protected:
void fill_audio_buffer(const buffer_s16_t audio);
volatile bool channel_spectrum_request_update { false };
std::array<complex16_t, 256> channel_spectrum;
std::array<std::complex<float>, 256> channel_spectrum;
uint32_t channel_spectrum_sampling_rate { 0 };
uint32_t channel_filter_pass_frequency { 0 };
uint32_t channel_filter_stop_frequency { 0 };