mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-05-06 08:45:01 -04:00
Reorganize analog audio configs structures.
This commit is contained in:
parent
ee67948a63
commit
cbaa04ff07
2 changed files with 90 additions and 50 deletions
|
@ -29,11 +29,27 @@
|
|||
|
||||
#include "ui_font_fixed_8x16.hpp"
|
||||
|
||||
class AnalogAudioModel {
|
||||
public:
|
||||
void configure_nbfm(const size_t index);
|
||||
void configure_wfm();
|
||||
void configure_am(const size_t index);
|
||||
#include "dsp_fir_taps.hpp"
|
||||
#include "dsp_iir.hpp"
|
||||
|
||||
struct AMConfig {
|
||||
const fir_taps_complex<64> channel;
|
||||
const AMConfigureMessage::Modulation modulation;
|
||||
|
||||
void apply() const;
|
||||
};
|
||||
|
||||
struct NBFMConfig {
|
||||
const fir_taps_real<24> decim_0;
|
||||
const fir_taps_real<32> decim_1;
|
||||
const fir_taps_real<32> channel;
|
||||
const size_t deviation;
|
||||
|
||||
void apply() const;
|
||||
};
|
||||
|
||||
struct WFMConfig {
|
||||
void apply() const;
|
||||
};
|
||||
|
||||
namespace ui {
|
||||
|
@ -56,8 +72,6 @@ public:
|
|||
void focus() override;
|
||||
|
||||
private:
|
||||
AnalogAudioModel model;
|
||||
|
||||
static constexpr ui::Dim header_height = 2 * 16;
|
||||
|
||||
RSSI rssi {
|
||||
|
@ -129,6 +143,10 @@ private:
|
|||
*/
|
||||
spectrum::WaterfallWidget waterfall;
|
||||
|
||||
size_t am_config_index = 0;
|
||||
size_t nbfm_config_index = 0;
|
||||
static constexpr size_t wfm_config_index = 0;
|
||||
|
||||
void on_tuning_frequency_changed(rf::Frequency f);
|
||||
void on_baseband_bandwidth_changed(uint32_t bandwidth_hz);
|
||||
void on_rf_amp_changed(bool v);
|
||||
|
@ -141,6 +159,13 @@ private:
|
|||
void on_reference_ppm_correction_changed(int32_t v);
|
||||
void on_headphone_volume_changed(int32_t v);
|
||||
void on_edit_frequency();
|
||||
|
||||
void on_am_config_index_changed(size_t n);
|
||||
void on_nbfm_config_index_changed(size_t n);
|
||||
|
||||
void update_am_config();
|
||||
void update_nbfm_config();
|
||||
void update_wfm_config();
|
||||
};
|
||||
|
||||
} /* namespace ui */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue