mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2025-08-25 09:37:43 +00:00
3MHz-wide fast close call works :) >3MHz doesn't work anymore :(
This commit is contained in:
@@ -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(),
|
||||
|
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user