Add sliding-frequency audio receiver tuning

This commit is contained in:
Belousov Oleg
2026-07-27 21:07:48 +03:00
parent c4f32ac436
commit ccf093b5d5
20 changed files with 790 additions and 69 deletions
+9 -2
View File
@@ -29,6 +29,7 @@
#include "dsp_decimate.hpp"
#include "dsp_demodulate.hpp"
#include "dsp_frequency_xlator.hpp"
#include "dsp_iir.hpp"
#include "audio_output.hpp"
@@ -50,6 +51,7 @@ class NarrowbandFMAudio : public BasebandProcessor {
private:
static constexpr size_t baseband_fs = 3072000;
static constexpr auto spectrum_rate_hz = 30.0f;
std::array<complex16_t, 512> dst{};
const buffer_c16_t dst_buffer{
@@ -69,8 +71,9 @@ class NarrowbandFMAudio : public BasebandProcessor {
(int16_t*)tone.data(),
sizeof(tone) / sizeof(int16_t)};
dsp::decimate::FIRC8xR16x24FS4Decim8 decim_0{};
dsp::decimate::FIRC16xR16x32Decim8 decim_1{};
dsp::decimate::FIRC8xR16x24FS4Decim4 decim_0{};
dsp::decimate::FIRC16xR16x16Decim2 audio_decim_0{};
dsp::FrequencyTranslatingDecimator32By8 translating_decim_1{};
dsp::decimate::FIRAndDecimateComplex channel_filter{};
int32_t channel_filter_low_f = 0;
int32_t channel_filter_high_f = 0;
@@ -85,6 +88,9 @@ class NarrowbandFMAudio : public BasebandProcessor {
AudioOutput audio_output{};
SpectrumCollector channel_spectrum{};
size_t spectrum_interval_samples{0};
size_t spectrum_samples{0};
bool spectrum_capture_active{false};
uint32_t tone_phase{0};
uint32_t tone_delta{0};
@@ -113,6 +119,7 @@ class NarrowbandFMAudio : public BasebandProcessor {
void pitch_rssi_config(const PitchRSSIConfigureMessage& message);
void configure(const NBFMConfigureMessage& message);
void capture_config(const CaptureConfigMessage& message);
void ddc_config(const AudioDDCConfigMessage& message);
};
#endif /*__PROC_NFM_AUDIO_H__*/