diff --git a/firmware/application/io_wave.cpp b/firmware/application/io_wave.cpp index 841d4fb3..57911578 100644 --- a/firmware/application/io_wave.cpp +++ b/firmware/application/io_wave.cpp @@ -89,9 +89,9 @@ uint16_t WAVFileReader::bits_per_sample() { Optional WAVFileWriter::create( const std::filesystem::path& filename, - size_t sampling_rate + size_t sampling_rate_set ) { - sampling_rate = sampling_rate; + sampling_rate = sampling_rate_set; const auto create_error = FileWriter::create(filename); if( create_error.is_valid() ) { return create_error; diff --git a/firmware/application/io_wave.hpp b/firmware/application/io_wave.hpp index 0cca3a46..affebda3 100644 --- a/firmware/application/io_wave.hpp +++ b/firmware/application/io_wave.hpp @@ -155,7 +155,6 @@ public: private: uint32_t sampling_rate { 0 }; - uint32_t bytes_written { 0 }; Optional update_header(); }; diff --git a/firmware/baseband/proc_nfm_audio.cpp b/firmware/baseband/proc_nfm_audio.cpp index 1fdea9b6..fc0073c1 100644 --- a/firmware/baseband/proc_nfm_audio.cpp +++ b/firmware/baseband/proc_nfm_audio.cpp @@ -39,7 +39,7 @@ void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) { feed_channel_stats(channel_out); channel_spectrum.feed(channel_out, channel_filter_pass_f, channel_filter_stop_f); - if ( !pwmrssi_enabled ) { + if (!pwmrssi_enabled) { auto audio = demod.execute(channel_out, audio_buffer); audio_output.write(audio); } else { @@ -49,7 +49,7 @@ void NarrowbandFMAudio::execute(const buffer_c8_t& buffer) { else pwmrssi_audio_buffer.p[c] = -32768; - if (synth_acc < synth_div) // 24kHz / 30 = 800Hz + if (synth_acc < synth_div) synth_acc++; else synth_acc = 0; @@ -103,7 +103,7 @@ void NarrowbandFMAudio::configure(const NBFMConfigureMessage& message) { 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.8f - + synth_acc = 0; configured = true;