3MHz-wide fast close call works :) >3MHz doesn't work anymore :(

This commit is contained in:
furrtek
2016-05-17 20:27:51 +02:00
parent e959d9a8ec
commit 7a90eab407
8 changed files with 96 additions and 65 deletions

View File

@@ -29,21 +29,16 @@
#include <array>
void CloseCallProcessor::execute(const buffer_c8_t& buffer) {
// 2048 complex8_t samples per buffer.
// 102.4us per buffer. 20480 instruction cycles per buffer.
if( phase == 0 ) {
std::fill(spectrum.begin(), spectrum.end(), 0);
}
for(size_t i=0; i<spectrum.size(); i++) {
// TODO: Removed window-presum windowing, due to lack of available code RAM.
// TODO: Apply window to improve spectrum bin sidelobes.
spectrum[i] += buffer.p[i + 0];
spectrum[i] += buffer.p[i + 1024];
}
if( phase == 127 ) {
if( phase == 50 ) {
const buffer_c16_t buffer_c16 {
spectrum.data(),
spectrum.size(),

View File

@@ -81,7 +81,7 @@ void NarrowbandFMAudio::configure(const NBFMConfigureMessage& message) {
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_spectrum.set_decimation_factor(std::floor(channel_filter_output_fs / (channel_filter_pass_f + channel_filter_stop_f)));
audio_output.configure(message.audio_hpf_config, message.audio_deemph_config, 0.5f);
audio_output.configure(message.audio_hpf_config, message.audio_deemph_config, 0.8f);
configured = true;
}