mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-13 08:55:39 -04:00
Persistent audio mute support (#1161)
* Persistent speaker mute support #1100 * Moving persistent mute support from WM8731/AK4951 codec files to audio.cpp module for simplification
This commit is contained in:
parent
5743d3a3b9
commit
ba2407d691
12 changed files with 159 additions and 80 deletions
|
@ -96,13 +96,18 @@ bool get_antenna_bias() {
|
|||
return antenna_bias;
|
||||
}
|
||||
|
||||
bool speaker_mode{false};
|
||||
void set_speaker_mode(const bool v) {
|
||||
speaker_mode = v;
|
||||
if (speaker_mode)
|
||||
audio::output::speaker_unmute();
|
||||
else
|
||||
void set_audio_mute(const bool v) {
|
||||
if (v)
|
||||
audio::output::speaker_mute();
|
||||
else
|
||||
audio::output::speaker_unmute();
|
||||
}
|
||||
|
||||
void set_speaker_disable(const bool v) {
|
||||
if (v)
|
||||
audio::output::speaker_disable();
|
||||
else
|
||||
audio::output::speaker_enable();
|
||||
}
|
||||
|
||||
static constexpr uint32_t systick_count(const uint32_t clock_source_f) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue