mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-06 05:34:50 -04:00
Remove channel decimation from AMConfigureMessage.
This commit is contained in:
parent
f82a22dd2c
commit
b029bacd8c
4 changed files with 4 additions and 6 deletions
|
@ -103,7 +103,6 @@ void AnalogAudioModel::configure_am() {
|
||||||
taps_6k0_decim_0,
|
taps_6k0_decim_0,
|
||||||
taps_6k0_decim_1,
|
taps_6k0_decim_1,
|
||||||
taps_6k0_channel,
|
taps_6k0_channel,
|
||||||
4,
|
|
||||||
audio_12k_hpf_300hz_config
|
audio_12k_hpf_300hz_config
|
||||||
};
|
};
|
||||||
shared_memory.baseband_queue.push(message);
|
shared_memory.baseband_queue.push(message);
|
||||||
|
|
|
@ -66,11 +66,11 @@ void NarrowbandAMAudio::configure(const AMConfigureMessage& message) {
|
||||||
constexpr size_t decim_1_output_fs = decim_1_input_fs / decim_1.decimation_factor;
|
constexpr size_t decim_1_output_fs = decim_1_input_fs / decim_1.decimation_factor;
|
||||||
|
|
||||||
constexpr size_t channel_filter_input_fs = decim_1_output_fs;
|
constexpr size_t channel_filter_input_fs = decim_1_output_fs;
|
||||||
const size_t channel_filter_output_fs = channel_filter_input_fs / message.channel_decimation;
|
const size_t channel_filter_output_fs = channel_filter_input_fs / channel_filter_decimation_factor;
|
||||||
|
|
||||||
decim_0.configure(message.decim_0_filter.taps, 33554432);
|
decim_0.configure(message.decim_0_filter.taps, 33554432);
|
||||||
decim_1.configure(message.decim_1_filter.taps, 131072);
|
decim_1.configure(message.decim_1_filter.taps, 131072);
|
||||||
channel_filter.configure(message.channel_filter.taps, message.channel_decimation);
|
channel_filter.configure(message.channel_filter.taps, channel_filter_decimation_factor);
|
||||||
channel_filter_pass_f = message.channel_filter.pass_frequency_normalized * channel_filter_input_fs;
|
channel_filter_pass_f = message.channel_filter.pass_frequency_normalized * channel_filter_input_fs;
|
||||||
channel_filter_stop_f = message.channel_filter.stop_frequency_normalized * channel_filter_input_fs;
|
channel_filter_stop_f = message.channel_filter.stop_frequency_normalized * channel_filter_input_fs;
|
||||||
channel_spectrum.set_decimation_factor(std::floor((channel_filter_output_fs / 2) / ((channel_filter_pass_f + channel_filter_stop_f) / 2)));
|
channel_spectrum.set_decimation_factor(std::floor((channel_filter_output_fs / 2) / ((channel_filter_pass_f + channel_filter_stop_f) / 2)));
|
||||||
|
|
|
@ -40,6 +40,8 @@ public:
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static constexpr size_t baseband_fs = 3072000;
|
static constexpr size_t baseband_fs = 3072000;
|
||||||
|
static constexpr size_t decim_2_decimation_factor = 4;
|
||||||
|
static constexpr size_t channel_filter_decimation_factor = 1;
|
||||||
|
|
||||||
std::array<complex16_t, 512> dst;
|
std::array<complex16_t, 512> dst;
|
||||||
const buffer_c16_t dst_buffer {
|
const buffer_c16_t dst_buffer {
|
||||||
|
|
|
@ -377,13 +377,11 @@ public:
|
||||||
const fir_taps_real<24> decim_0_filter,
|
const fir_taps_real<24> decim_0_filter,
|
||||||
const fir_taps_real<32> decim_1_filter,
|
const fir_taps_real<32> decim_1_filter,
|
||||||
const fir_taps_real<32> channel_filter,
|
const fir_taps_real<32> channel_filter,
|
||||||
const size_t channel_decimation,
|
|
||||||
const iir_biquad_config_t audio_hpf_config
|
const iir_biquad_config_t audio_hpf_config
|
||||||
) : Message { ID::AMConfigure },
|
) : Message { ID::AMConfigure },
|
||||||
decim_0_filter(decim_0_filter),
|
decim_0_filter(decim_0_filter),
|
||||||
decim_1_filter(decim_1_filter),
|
decim_1_filter(decim_1_filter),
|
||||||
channel_filter(channel_filter),
|
channel_filter(channel_filter),
|
||||||
channel_decimation { channel_decimation },
|
|
||||||
audio_hpf_config { audio_hpf_config }
|
audio_hpf_config { audio_hpf_config }
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -391,7 +389,6 @@ public:
|
||||||
const fir_taps_real<24> decim_0_filter;
|
const fir_taps_real<24> decim_0_filter;
|
||||||
const fir_taps_real<32> decim_1_filter;
|
const fir_taps_real<32> decim_1_filter;
|
||||||
const fir_taps_real<32> channel_filter;
|
const fir_taps_real<32> channel_filter;
|
||||||
const size_t channel_decimation;
|
|
||||||
const iir_biquad_config_t audio_hpf_config;
|
const iir_biquad_config_t audio_hpf_config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue