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
+21 -1
View File
@@ -29,6 +29,7 @@
#include "complex.hpp"
#include "block_decimator.hpp"
#include "dsp_decimate.hpp"
#include <cstdint>
#include <array>
@@ -40,8 +41,18 @@ class SpectrumCollector {
void on_message(const Message* const message);
void set_decimation_factor(const size_t decimation_factor);
void set_channel_filter_offset(const int32_t offset) {
channel_filter_offset = offset;
}
void feed(
bool feed(
const buffer_c16_t& channel,
const int32_t filter_low_frequency,
const int32_t filter_high_frequency,
const int32_t filter_transition);
void start_filtered_capture(const size_t decimation_factor);
bool feed_filtered(
const buffer_c16_t& channel,
const int32_t filter_low_frequency,
const int32_t filter_high_frequency,
@@ -55,10 +66,19 @@ class SpectrumCollector {
volatile bool channel_spectrum_request_update{false};
bool streaming{false};
std::array<std::complex<float>, 256> channel_spectrum{};
std::array<complex16_t, 1024> filtered_capture_{};
std::array<complex16_t, 512> filtered_stage_0_{};
std::array<complex16_t, 256> filtered_stage_1_{};
dsp::decimate::FIRC16xR16x63HalfbandDecim2 filtered_decim_0_{};
dsp::decimate::FIRC16xR16x63HalfbandDecim2 filtered_decim_1_{};
size_t filtered_capture_count_{0};
size_t filtered_capture_decimation_{1};
bool filtered_capture_ready_{false};
uint32_t channel_spectrum_sampling_rate{0};
int32_t channel_filter_low_frequency{0};
int32_t channel_filter_high_frequency{0};
int32_t channel_filter_transition{0};
int32_t channel_filter_offset{0};
void post_message(const buffer_c16_t& data);