mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-06-23 14:24:18 -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
|
@ -128,13 +128,6 @@ SondeView::SondeView(NavigationView& nav) {
|
|||
if (logger)
|
||||
logger->append(LOG_ROOT_DIR "/SONDE.TXT");
|
||||
|
||||
// initialize audio:
|
||||
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);
|
||||
};
|
||||
|
||||
audio::output::start();
|
||||
audio::output::speaker_unmute();
|
||||
|
||||
|
@ -251,11 +244,6 @@ void SondeView::on_packet(const sonde::Packet& packet) {
|
|||
}
|
||||
}
|
||||
|
||||
void SondeView::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 SondeView::set_target_frequency(const uint32_t new_value) {
|
||||
target_frequency_ = new_value;
|
||||
receiver_model.set_tuning_frequency(target_frequency_);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue