Rebake of AM, NFM demodulators -- more flexible filtering/configuration.

Also make SpectrumCollector dynamically configurable.
Add deemphasis filter to NFM.
This commit is contained in:
Jared Boone
2015-12-29 10:58:53 -08:00
parent df593c2f0f
commit bbfcca8ec0
8 changed files with 249 additions and 64 deletions

View File

@@ -33,22 +33,27 @@
#include "spectrum_collector.hpp"
#include <cstdint>
#include <array>
class NarrowbandAMAudio : public BasebandProcessor {
public:
NarrowbandAMAudio() {
decimator.set_decimation_factor(ChannelDecimator::DecimationFactor::By32);
channel_filter.configure(channel_filter_taps.taps, 2);
}
NarrowbandAMAudio();
void execute(const buffer_c8_t& buffer) override;
void on_update_spectrum() override { channel_spectrum.update(); }
private:
ChannelDecimator decimator;
const fir_taps_real<64>& channel_filter_taps = taps_64_lp_031_070_tfilter;
std::array<complex16_t, 512> dst;
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0;
dsp::decimate::FIRC16xR16x32Decim8 decim_1;
dsp::decimate::FIRAndDecimateComplex channel_filter;
uint32_t channel_filter_pass_f;
uint32_t channel_filter_stop_f;
dsp::demodulate::AM demod;
IIRBiquadFilter audio_hpf { audio_hpf_config };
SpectrumCollector channel_spectrum;