mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-22 22:04:24 -04:00
Add AudioVolumeField -- cleanup (#1107)
* WIP Adding AudioVolumeField * Fix build break * Add Bernd to about --------- Co-authored-by: kallanreed <kallanreed@outlook.com>
This commit is contained in:
parent
7e8a139732
commit
28319652c1
22 changed files with 91 additions and 186 deletions
|
@ -198,11 +198,6 @@ AnalogAudioView::AnalogAudioView(
|
|||
this->on_show_options_modulation();
|
||||
};
|
||||
|
||||
field_volume.set_value((receiver_model.headphone_volume() - audio::headphone::volume_range().max).decibel() + 99);
|
||||
field_volume.on_change = [this](int32_t v) {
|
||||
this->on_headphone_volume_changed(v);
|
||||
};
|
||||
|
||||
record_view.on_error = [&nav](std::string message) {
|
||||
nav.display_modal("Error", message);
|
||||
};
|
||||
|
@ -391,11 +386,6 @@ void AnalogAudioView::on_reference_ppm_correction_changed(int32_t v) {
|
|||
persistent_memory::set_correction_ppb(v * 1000);
|
||||
}
|
||||
|
||||
void AnalogAudioView::on_headphone_volume_changed(int32_t v) {
|
||||
const auto new_volume = volume_t::decibel(v - 99) + audio::headphone::volume_range().max;
|
||||
receiver_model.set_headphone_volume(new_volume);
|
||||
}
|
||||
|
||||
void AnalogAudioView::update_modulation(const ReceiverModel::Mode modulation) {
|
||||
audio::output::mute();
|
||||
record_view.stop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue