Persist audio (#1110)

* Add credits
* Persist audio, add volume to apps
* Remove comment
* Hack around apparent alignment problem
This commit is contained in:
Kyle Reed 2023-06-05 11:09:50 -07:00 committed by GitHub
parent 9c39061590
commit af448cf444
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 46 additions and 49 deletions

View file

@ -182,7 +182,6 @@ bool ReconView::recon_load_config_from_sd() {
squelch = -14;
recon_match_mode = RECON_MATCH_CONTINUOUS;
wait = RECON_DEF_WAIT_DURATION;
volume = 40;
return false;
}
@ -221,11 +220,6 @@ bool ReconView::recon_load_config_from_sd() {
else
wait = RECON_DEF_WAIT_DURATION;
if (it > 7)
volume = strtoll(params[7].c_str(), nullptr, 10);
else
volume = 40;
return true;
}
@ -244,13 +238,12 @@ bool ReconView::recon_save_config_to_sd() {
settings_file.write_line(to_string_dec_int(squelch));
settings_file.write_line(to_string_dec_uint(recon_match_mode));
settings_file.write_line(to_string_dec_int(wait));
settings_file.write_line(to_string_dec_int(volume));
return true;
}
void ReconView::audio_output_start() {
audio::output::start();
receiver_model.set_headphone_volume(receiver_model.headphone_volume());
receiver_model.set_headphone_volume(receiver_model.headphone_volume()); // WM8731 hack.
}
void ReconView::recon_redraw() {
@ -438,7 +431,6 @@ ReconView::ReconView(NavigationView& nav)
load_ranges = persistent_memory::recon_load_ranges();
load_hamradios = persistent_memory::recon_load_hamradios();
update_ranges = persistent_memory::recon_update_ranges_when_recon();
field_volume.set_value(volume);
if (sd_card_mounted) {
// load auto common app settings
auto rc = settings.load("recon", &app_settings);